I'd like to know if there is an official way to rescue from a botched install due to filled disk space. Working with VMs and trying to conserve space on golden images has led me to this problem several times. I can usually remedy it by using ncdu -x /
and deleting unneeded files, but apt install ncdu
has to installed beforehand. I've also used journalctl --vacuum-size=5M
to reduce the system log file. Or using apt purge *<old kernel number>
, but again that wont work once the apt install process is broken.
This one suggests finding and deleting the packages that installed. https://www.cyberciti.biz/howto/debian-linux/ubuntu-linux-rollback-an-apt-get-upgrade/
This post suggests using apt clean
and apt install -f
to repair the database. I'm not sure apt clean work with apt broken and apt purge showing apt --fix-broken install
. apt install -f
seems to retry with force the pending install.
Disk space issue after apt-get update
I actually just checked and apt clean
does in fact work and restores some disk space. It seems that using apt purge <package>
after clearing some space with apt clean
is the only way to get back to the state before the broken install.
It would be great if Apt would say to "use apt clean if the disk is full", which it could check. It could also check for enough free space before allowing non-forced install.
-y
flag which bypasses confirmation prompts. – Nmath Feb 11 '22 at 00:51echo 'SystemMaxUse=200M' >> /etc/systemd/journald.conf && systemctl restart rsyslog
to keep my root happy while running a tight ship. The only things beside var that fill up are home and tmp and i've addressed those per CIS benchmarks as stated above. – alchemy Feb 11 '22 at 01:33apt clean
only clears the apt cache. – Nmath Feb 11 '22 at 01:48df
just said I had 174M free space, "Need to get 16.7 MB of archives. After this operation, 79.5 MB of additional disk space will be used." and then proceeded to fill up the disk to 0% free and halting install during the process. I usedapt clean
and restarted the remaining install which only need 10MB, succeeded and I have 7.7MB left, 89MB afterapt clean
. – alchemy Feb 11 '22 at 18:59