An upgrade installs a new version over the old one. A question comes up when both you and the package authors changed a setting.
A new version goes in with the same command: sudo dpkg -i with the new version's archive, or sudo apt upgrade from the repositories. dpkg unpacks the new files over the old ones and checks dependencies again. A requirement like (= 2.0-1) is met by the new version only if the package it depends on is upgraded along with it.
With a conffile dpkg acts like this. If you did not change the file, dpkg installs the new version silently. If the file did not change in the package, dpkg silently keeps yours. If both changed, dpkg stops and asks:
D shows the difference between the two versions. Answer N keeps yours, and dpkg puts the new one alongside, in lab-pkg-report.conf.dpkg-dist. Answer Y installs the new one, and yours is saved as .dpkg-old.
dpkg asked about /etc/lab-pkg-report.conf, and you answered N. Where does the setting from the new package version end up after the upgrade?
-
Nmeans "keep mine":/etc/lab-pkg-report.confkeeps your edit. AnswerYinstalls the new version. -
dpkg throws nothing away: it puts the rejected version alongside.
ls /etc/lab-pkg-report.conf*shows the second file.
Answer N leaves your setting in place, and dpkg puts the package's version into .dpkg-dist. Compare them with diff /etc/lab-pkg-report.conf /etc/lab-pkg-report.conf.dpkg-dist.
Key points
- An upgrade installs a new version over the old one, with the same dependency check.
- dpkg asks about a conffile only when both your file and the package's file changed.
-
The rejected version of the setting stays alongside:
.dpkg-distor.dpkg-old.