01Measure
Free space on each partition, then the heaviest folders in your home directory:
df -hdu -sh ~/* ~/.[!.]* 2>/dev/null | sort -h | tail -15The ncdu tool, available in every distribution, also lets you browse the tree while seeing each folder’s size.
02The package manager
It keeps downloaded packages and dependencies that are no longer needed. On Debian, Ubuntu and Linux Mint:
sudo apt autoremove --purgesudo apt cleanOn Fedora:
sudo dnf autoremovesudo dnf clean allautoremove also removes old kernels on Ubuntu; Fedora keeps only three. Read the proposed list before confirming.
03systemd logs
The system journal can reach several GB. Check its size, then limit it:
journalctl --disk-usagesudo journalctl --vacuum-size=200MFor a permanent limit, set SystemMaxUse=200M in /etc/systemd/journald.conf. Do not empty /var/log by hand: some services expect their files.
04Snap and Flatpak
Snap keeps old revisions of each app. Reduce them to two from now on, then list the disabled ones:
sudo snap set system refresh.retain=2snap list --all | grep disabledEach line is removed with sudo snap remove NAME --revision=NUMBER.
Flatpak leaves runtimes that no app uses anymore:
flatpak uninstall --unused05Caches, Trash and snapshots
~/.cache holds your apps’ caches (browsers, thumbnails, developer tools). Its contents rebuild; clear it with your apps closed. The Trash lives in ~/.local/share/Trash and is emptied from the file manager.
If you use Timeshift or Snapper, old snapshots can take up a lot of space: delete them from Timeshift or with snapper delete, keeping the most recent one. For Docker and development dependencies, see Clean up developer caches.
What not to do
- deleting by hand in
/usr,/var/lib/dpkg,/var/lib/rpmor/boot: the package system or boot can break; - removing a kernel by hand, especially the one in use (
uname -r); - running
sudo rm -rf /var/log/*: usejournalctl --vacuum-size; - copying a cleanup command found online without understanding what it erases.