Table of Contents
When Linux reports low disk space, first find which filesystem is full and which directories are growing. Old downloads, virtual machines, package caches, logs and snapshots need different cleanup methods. Removing a few small apps may achieve little if one large disk image is the real cause.
Back up important personal files before deleting them. Use package managers and snapshot tools for system data rather than manually removing files from system directories. Linux cleanup behavior varies by distribution and configuration; it is not true that Linux never cleans up automatically.
1. Locate the space problem





Check filesystem usage in a terminal:
df -h
Look at the filesystem mounted on /, and also /home or /boot if they are separate. Free space on another drive does not solve a full root partition.
Disk Usage Analyzer, also called Baobab, provides a graphical breakdown of folder sizes. If it is not installed, use the command for your distribution, not both commands joined together:
Debian, Ubuntu or Linux Mint:
sudo apt install baobab
Fedora:
sudo dnf install baobab
Scan your home folder first. Look for old ISO downloads, duplicate archives, videos, VM disks or backup directories. An installation requires some free space, so if the drive is completely full, begin with existing tools. The du command can help inspect directories without installing a graphical app.
Large does not mean disposable. Confirm what a file contains and whether it is your only copy. Remove unused virtual disks through the virtualization app when appropriate. Check the Trash after ordinary file deletion, but empty it only after reviewing its contents.
2. Clean downloaded package caches

Package caches contain downloaded installation files, not the installed applications themselves. Cleaning them can reclaim space, but you may need to download packages again for reinstallation or rollback. The amount recovered depends on what is actually cached.
| Distribution | Command | Effect |
|---|---|---|
| Debian / Ubuntu / Linux Mint | sudo apt clean | Clears downloaded package archives; does not uninstall apps. |
| Fedora | sudo dnf clean all | Clears repository caches, including metadata that later commands may download again. |
| Arch-based systems | sudo paccache -r | By default retains the three newest cached versions of each package. |
On Arch, paccache comes from pacman-contrib. Run paccache -d to preview candidates before removal. See the paccache manual for retention options. Avoid wiping the entire cache if you may need an older package version.
For application caches, use the application's own controls where possible. Clear browser cache separately from cookies, saved passwords and site data. Do not delete arbitrary hidden folders in your home directory: some contain settings or valuable application data.
3. Review unused packages and old kernels

Unused dependency packages are different from downloaded archives: removing them changes installed software. Review the proposed list before confirming a transaction.
| Distribution | Review step | Removal step |
|---|---|---|
| Debian / Ubuntu / Linux Mint | sudo apt-get --simulate autoremove | sudo apt autoremove, after checking the list |
| Fedora | Review the transaction proposed by sudo dnf autoremove | Confirm only packages you no longer need |
| Arch | pacman -Qdtq lists orphan packages | sudo pacman -Rns package_name for deliberately selected packages |
An orphan package may still be something you use directly. Do not remove a list blindly. The APT manual explains simulation and autoremove; adding --purge also removes applicable package configuration files and is not necessary for routine cleanup.
Keep the running kernel and a known-working fallback. Check the running version with uname -r. Linux Mint's Update Manager includes kernel management under View > Linux Kernels; use its supported removal controls. Other distributions manage retained kernels differently, and autoremove is not a universal kernel cleanup command.
4. Check systemd journal logs

On systems using the systemd journal, check its size:
journalctl --disk-usage
If old logs are taking substantial space, first preserve any records needed for troubleshooting. Then choose an appropriate retention limit. These example commands delete older archived journal files:
| Command | What it does |
|---|---|
sudo journalctl --vacuum-size=100M | Reduces archived journal storage toward 100 MB. |
sudo journalctl --vacuum-time=3d | Removes archived journal files older than three days. |
These are examples, not recommended limits for every system. Active journal files are excluded from vacuuming, so total usage may remain above the size limit. The journalctl manual explains that distinction. Journald also has retention settings; it does not necessarily grow without limits.
If logs quickly refill, investigate repeated errors rather than repeatedly deleting the evidence. Other applications may keep separate logs that journalctl does not manage.
5. Manage Timeshift snapshots through Timeshift

Timeshift protects system files and settings. By default it excludes personal files in home directories, so it does not replace a separate document backup. Its documentation explains the exclusions.
Open Timeshift, inspect the snapshot list and remove only restore points you no longer need. Keep a suitable working restore point. Adjust scheduled retention to fit the available drive space rather than allowing unnecessary snapshots to accumulate.
If the graphical interface cannot run, list snapshots first:
sudo timeshift --list
To delete one selected snapshot, replace SNAPSHOT_NAME with its exact name from that list:
sudo timeshift --delete --snapshot 'SNAPSHOT_NAME'
Do not manually delete snapshot directories or remove every restore point as a routine fix. Whether snapshots can be moved to another device depends on the snapshot mode and filesystem; use Timeshift's supported configuration.
After each cleanup, run df -h again. If the same directory grows rapidly, identify the responsible application. If necessary data genuinely exceeds the drive's capacity, a storage upgrade may still be appropriate. Understanding basic Linux commands helps you inspect the problem before taking action.
Reader Comments 0
Sign in with email or Google to join the discussion.