Cleaning disk space on Fedora
Fedora takes quite some space, unnecessarily sometimes. Here a quick guide to gaining more free disk space.
Run bleachbit
Run bleachbit . Do not select all options, some are removing useful files. Here are some that I like:
- Select any browser that you are not regularly using. I never select my main browser, as it will delete cache / cookies etc. requiring lots of work to login back to all sites, and the cache will fill up quickly again.
- System > Rotated Logs, Cache, Temporary Files, Trash
- Thumbnails
- X11 Debug logs
- Yum clean all
Delete unnecessary installed dependencies
Run dnf autoremove
Make sure to check the list that nothing is removed that you are actively using.
Clean PackageKit
PackageKit sometimes leaves traces of old distribution versions with loads of downloaded packages. Check /var/cache/PackageKit . For example on my Fedora 26 system, I could completely delete /var/cache/PackageKit/25 .
To clean the current cache, run sudo pkcon refresh force -c -1
If you are using dnf instead of PackageKit in general (like me), you should maybe just disable the automatic downloading of updates gsettings set org.gnome.software download-updates false
Removing the biggest packages
Run the following command to find the largest packages on your system:
rpm -qa --queryformat '%{name} %{size}\n' | sort -n -k 2 -r | head -n 20jdk1.8.0_121 275761982
jdk1.8.0_66 267727446
libreoffice-core 249752920
google-chrome-stable 238671482
dmd 210596997
insync 199538204
pocl 198662992
google-earth-stable 188735678
refox 173526176
linux-firmware 151101331
eclipse-pde 130013670
inkscape 124515283
boost-devel 109530997
java-1.8.0-openjdk-headless 108968789
pypy-libs 94400862
emacs-common 92060171
wireshark-cli 89820103
riak 86913949
qtwebkit 74213859
docker 71711304
You will quickly see that you can safely remove some of those. For example, in the list above I found 3 versions of Java (one is enough), two browsers (I do not use Firefox), Google Earth (which I dabbled around with once), Wireshark-CLI (never used).
Run baobab
Install and run baobab , otherwise called the Disk Usage Analyzer to find further large files on your computer.
