]> pere.pagekite.me Git - homepage.git/blobdiff - blog/data/2018-07-08-apt-upgrade-full-disk.txt
Generated.
[homepage.git] / blog / data / 2018-07-08-apt-upgrade-full-disk.txt
index 2d0baa23bcbcd45a213cc804ad7711b4d5ab4366..784ec6c185504e1e09b8bf1efa26bf4934a44720 100644 (file)
@@ -1,6 +1,6 @@
 Title: Debian APT upgrade without enough free space on the disk...
 Tags: english, debian
-Date: 2018-07-08 12:00
+Date: 2018-07-08 12:10
 
 <p>Quite regularly, I let my Debian Sid/Unstable chroot stay untouch
 for a while, and when I need to update it there is not enough free
@@ -45,16 +45,30 @@ for p in $(apt list --upgradable | ignore "$@" |cut -d/ -f1 | grep -v '^Listing.
 done
 </pre></blockquote></p>
 
-<p>To use it, simply run it as root from the command line.  If it
-fail, try 'apt install -f' to clean up the mess and run the script
-again.</p>
+<p>The script will extract the list of packages to upgrade, try to
+download the packages needed to upgrade one package, install the
+downloaded packages using dpkg.  The idea is to upgrade packages
+without changing the APT mark for the package (ie the one recording of
+the package was manually requested or pulled in as a dependency).  To
+use it, simply run it as root from the command line.  If it fail, try
+'apt install -f' to clean up the mess and run the script again.  This
+might happen if the new packages conflict with one of the old
+packages.  dpkg is unable to remove, while apt can do this.</p>
 
-<p>It take one option, a package to ingore in the list of packages to
+<p>It take one option, a package to ignore in the list of packages to
 upgrade.  The option to ignore a package is there to be able to skip
 the packages that are simply too large to unpack.  Today this was
 'ghc', but I have run into other large packages causing similar
 problems earlier (like TeX).</p>
 
+<p>Update 2018-07-08: Thanks to Paul Wise, I am aware of two
+alternative ways to handle this.  The "unattended-upgrades
+--minimal-upgrade-steps" option will try to calculate upgrade sets for
+each package to upgrade, and then upgrade them in order, smallest set
+first.  It might be a better option than my above mentioned script.
+Also, "aptutude upgrade" can upgrade single packages, thus avoiding
+the need for using "dpkg -i" in the script above.</p>
+
 <p>As usual, if you use Bitcoin and want to show your support of my
 activities, please send Bitcoin donations to my address
 <b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>