I have an issue where my Ubuntu Server (v20.14) cannot fully function because it is out of space on the root. It's so bad, that even attempting to run "apt purge some-image" returns "You don't have enough free space in /var/cache/apt/archives/". "apt update" just fails. I've tried "clean" and "autoclean" and these have nothing left to offer.
All system files are on a single 1TB drive that I once believed was large enough for anything I would ever throw at it. This is primarily a Plex server, with the media files on hard drives under "/mnt".
fdisk -l on the system mount look slike this:
Disk /dev/sdb: 931.53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000NM0033-9ZM
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 7FFD308B-1054-4E65-B1D2-6FE3DFC3F3D5
Device Start End Sectors Size Type
/dev/sdb1 2048 4095 2048 1M BIOS boot
/dev/sdb2 4096 1953521663 1953517568 931.5G Linux filesystem
df -H returns:
Filesystem Size Used Avail Use% Mounted on
udev 4.1G 0 4.1G 0% /dev
tmpfs 814M 3.2M 811M 1% /run
/dev/sdb2 984G 954G 0 100% /
tmpfs 4.1G 0 4.1G 0% /dev/shm
tmpfs 5.3M 4.1k 5.3M 1% /run/lock
tmpfs 4.1G 0 4.1G 0% /sys/fs/cgroup
/dev/loop0 59M 59M 0 100% /snap/core18/1885
/dev/loop3 73M 73M 0 100% /snap/lxd/17629
/dev/loop5 32M 32M 0 100% /snap/snapd/9279
/dev/sda1 3.0T 2.0T 835G 71% /mnt/media1
/dev/sdc 3.0T 1.8T 1.1T 65% /mnt/media2
/dev/sdd 4.0T 2.5T 1.3T 67% /mnt/media3
//192.168.4.10/music 3.0T 1.1T 1.9T 37% /mnt/music
tmpfs 814M 4.1k 814M 1% /run/user/1000
Most of the space appears to be used up in /var/lib.
sudo du -h --max-depth=1 / | sort -h | tail -n 10
... returns ...
10M /etc
11M /.cache
43M /home
302M /boot
347M /opt
501M /snap
906M /var
5.8G /usr
7.0T /
7.0T /mnt
I have uninstalled Plex (I have a config back-up) and emptied most of /var/logs, /tmp, and /var/tmp, my root folder seems stubbornly stuck on 100% used.
I still have terminal access and, oddly enough, WebMin is fully functional. My media drives are correctly mounted and can accept anything I need to move to them. Any ideas what I can do to free some space, other than rebuild this from scratch?