This is a desktop system, with a 1TB SSD for the OS Xubuntu 20.04.6, and several HDDs for all my files. So the OS shouldn't be taking up that much space. But there's the output of df:
Filesystem 1K-blocks Used Available Use% Mounted on
udev 16332704 0 16332704 0% /dev
tmpfs 3284264 3384 3280880 1% /run
/dev/nvme0n1p2 959786032 740380052 170577772 82% /
There's more lines, obviously, but the the /dev/nvme one is the problem. I can't for the life of me find what's taking up all that space. The "home" folder has about 6GB in it.
I'm suspicious of the "proc" directory. Nautilus says it has tens of thousands of files, for a total of 128TB. I think not. Here's the output of cd /proc; sudo du -hs
du: cannot read directory './3032/task/3032/net': Invalid argument
du: cannot read directory './3032/net': Invalid argument
du: cannot read directory './3288/task/3288/net': Invalid argument
du: cannot read directory './3288/net': Invalid argument
du: cannot access './6606/task/6606/fd/3': No such file or directory
du: cannot access './6606/task/6606/fdinfo/3': No such file or directory
du: cannot access './6606/fd/4': No such file or directory
du: cannot access './6606/fdinfo/4': No such file or directory
0
I used "du -hs" on all the other directories under "/" and they add up to about 55GB. And there's a 2GB swapfile. So how do I find what's eating up all my SSD space?
UPDATE: Here is the output of cd / ; sudo du -hxd 1
j@puter:/$ cd / ; sudo du -hxd 1
11M ./root
18M ./bin
20M ./sbin
4.0K ./mnt
5.4G ./usr
16K ./lost+found
184K ./tmp
532M ./opt
248M ./boot
84K ./snap
12G ./var
6.4G ./home
4.0K ./lib64
8.0K ./srv
1.5G ./lib
4.0K ./cdrom
14M ./etc
8.0K ./media
28G .
j@puter:/$
Update: booted from a live USB, ran fsck
xubuntu@xubuntu:~$ sudo fsck -f /dev/nvme0n1p2
fsck from util-linux 2.37.2
e2fsck 1.46.5 (30-Dec-2021)
Pass 1: Checking inodes, blocks, and sizes
Inode 34099073 extent tree (at level 1) could be narrower. Optimize<y>? yes
Inode 34344578 extent tree (at level 1) could be shorter. Optimize<y>? yes
Pass 1E: Optimizing extent trees
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/nvme0n1p2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/nvme0n1p2: 514456/61022208 files (4.6% non-contiguous), 189197520/244059136 blocks
xubuntu@xubuntu:~$
Update: ncdu
confirms what du
tells me:
Total disk usage: 27.4 GiB Apparent size: 27.2 GiB Items: 402910
And when I look at "properties" in the GUI, it says
401685 items, totalling 26.1 GiB (28,044,956,192 bytes)
(some contents unreadable)
162.7 GiB of 915.3 GiB free (82% used)
/dev/nvme0n1p2
's "free" vs "used" may be a misleading value because it's then an LVM member and can cause value misreads this way. Also which Ubuntu/Xubuntu version are you using? – Thomas Ward Oct 12 '23 at 01:23fsck
(results above), didn't fix the problem, and I'm still in the dark.... – jms Oct 13 '23 at 03:04sudo ncdu -x -r /
, the-r
is to just read, the-x
to not cross filesystem boundaries – Pablo Bianchi Oct 13 '23 at 05:25