I’ve been using Silverblue for some years and I’m happy with it.
One of the main issues I have is disk space. I have a 10 year old laptop with one 237GB SSD disk. I use many flatpak apps and SDK to build them.
I’m trying to understand what is taking more space. As Baobab flatpak cannot read the root directory, I must use df and du.
First, some basic information:
# fdisk -l
Disk /dev/sda: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: SAMSUNG SSD PM83
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: 4EBCA452-6855-45D3-A98B-40BCAC9BAD46
Device Start End Sectors Size Type
/dev/sda1 2048 1230847 1228800 600M EFI System
/dev/sda2 1230848 3327999 2097152 1G Linux filesystem
/dev/sda3 3328000 500117503 496789504 236.9G Linux filesystem
Disk /dev/zram0: 7.62 GiB, 8180989952 bytes, 1997312 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
# df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 237G 222G 15G 94% /
Let’s check which directories use more space:
# du -h --max-depth=1 /
166M /boot
0 /dev
0 /proc
9.9M /run
0 /sys
34G /sysroot
16K /tmp
0 /usr
235G /var
47M /etc
269G /
/sysroot is 34G. Interesting. Actually it’s all in /sysroot/ostree:
# du -h --max-depth=1 /sysroot/ostree/
4.4G /sysroot/ostree/repo
30G /sysroot/ostree/deploy
8.0K /sysroot/ostree/boot.1.1
34G /sysroot/ostree/
Which data are in /sysroot/ostree/deploy? 30G is a lot!
And now the real question. If I check the data used by my home in Nautilus it says 45.8GB. However, look at this command:
# du -h --max-depth=1 /var
1.1G /var/tmp
27G /var/lib
753M /var/log
225G /var/home
17M /var/roothome
142M /var/opt
0 /var/srv
13M /var/usrlocal
0 /var/mnt
16M /var/spool
608M /var/cache
0 /var/adm
0 /var/db
0 /var/empty
0 /var/ftp
0 /var/games
0 /var/local
0 /var/nis
0 /var/preserve
0 /var/yp
7.9M /var/www
0 /var/kerberos
254G /var
/var/home is 225G?!? This must be wrong.
I cannot understand how 222GB out of 237G have been used.