Ivan Tomica

Fedora and disk space usage

Today I noticed weirdly high disk space usage on my / partition. I have to admit that I don’t monitor those things so often on my home PC since I have plenty of free space but this came really weird to me since classic Linux install regularly takes around 3 to 5 GB of space (depending on how much packages you have installed).

First thing I checked was space usage directory by directory on /:

# du -sm * 2> /dev/null | sort -n
...
16281	var
...

and immediately noticed weirdly high space usage on /var. When I looked more closely it was /var/log and /var/cache/PackageKit/metadata fault. Log directory was problematic because I haven’t rotated logs on that PC since it was installed year or more ago. It went through distro upgrade and some other stuff so I wasn’t too surprised. This was easily solvable by vacuuming logs with:

journalctl --vacuum-time=2weeks

So, let’s get to the PackageKit’s metadata directory. Apparently Gnome software center on Fedora uses it as a backend and automatically downloads packaged and keeps them. My solution to this problem was to just delete all of the rpm’s in that directory (since I don’t need them). For a permanent solution this email thread suggests uncommenting:

KeepCache=false

in /etc/PackageKit/PackageKit.conf

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *