Package: general

A distro upgrade of Debian needs a lot of disk space on the root partition.
That partition often doesn't have a large size. That could for example be 
because it's on a mobile device, on a SSD drive, has lots of installed 
software, or because the user simply followed the advice of guides that usually 
recommend the root partition to be relatively small.
I had this problem when upgrading to Debian12 and also had it during the last 
distro upgrade.

A problem is that the storage requirements displayed when running sudo apt-get 
upgrade --without-new-pkgs or sudo apt-get full-upgrade are lower than what is 
actually needed. Obviously, that shouldn't be the case. Solving this problem 
could be redundant if there was a way to make it upgrade incrementally in 
several steps.

Could you please make stepwise distribution upgrades possible?

With the two commands above one can already split it up into two steps but 
especially the second command still requires a lot of disk space. That it 
displays less storage requirements than actually needed makes it more difficult 
to avoid the problem. Avoiding and solving potential issues resulting from the 
upgrade breaking or from what the user tries to do to free up disk space 
requires skill and time, and makes the upgrade userunfriendly and far less 
smooth than it could be.

Here's what I do to free up disk space and I had to do some of the things while 
the upgrade was ongoing as I noticed that it takes up more disk space than I 
previously freed up: https://unix.stackexchange.com/q/774199/233262 (such as 
deleting the cached packages after an unrelated fatal error breaking the 
upgrade so that it downloaded half of them again when I ran the full-upgrade 
command again after solving that).

This could also be an issue for apt but it could probably also be done 
independently from that package which is why I filed it under general for now.

One could also make it so that it dynamically adjusts depending on how much 
disk space is available throughout the upgrade. It could and probably should 
still only be one command.

For example, I think a good approach to this would be something like this (if 
the user is low on root partition disk space):
1. asking for *at least* 400MB to be available
2. if a parameter for stepwise is set or it detected low free disk space:
3. downloading the first 300 MB or so of packages
4. installing these
5. deleting the cached packages from /var/cache/apt/archives/
6. downloading the next batch up to the storage limit set at start
7. and so on (without exiting in-between)

Reply via email to