A full root filesystem slows updates, breaks builds, and can freeze the desktop. On Ubuntu you do not need a single proprietary “disk cleaner” to fix that—apt, journalctl, user caches, old Snap revisions, and optional GUI tools such as BleachBit or Ubuntu Cleaner each target different clutter.
This guide covers practical Ubuntu cleaning: see what is using space, reclaim room with terminal commands you can script, install BleachBit from universe, add Ubuntu Cleaner from the gerardpuig PPA when you want a janitor-style app, and preview deletions before you commit. I ran these steps on Ubuntu 25.04 and kept the real output below. Where a tool surprised me—400 MB in apt archives, BleachBit deleting apt lists if you are not careful, Ubuntu Cleaner’s GUI-only interface—the notes sit in the same section.
Tested on: Ubuntu 25.04 (Plucky Puffin); kernel 6.14.0-37-generic.
apt and journalctl over blind GUI “select all.”
Quick command summary
| Task | Command |
|---|---|
| Check disk use | df -h and du -sh ~/.cache /var/cache/apt/archives |
| Visual disk map (GUI) | baobab (Disk Usage Analyzer) |
| Clear downloaded debs | sudo apt clean |
| Drop obsolete debs | sudo apt autoclean |
| Remove unused deps | sudo apt autoremove -y |
| Journal size | journalctl --disk-usage |
| Trim journals | sudo journalctl --vacuum-time=7d |
| Install BleachBit | sudo apt install -y bleachbit |
| BleachBit preview | bleachbit --preview apt.clean |
| Install Ubuntu Cleaner | sudo add-apt-repository -y ppa:gerardpuig/ppa && sudo apt update && sudo apt install -y ubuntu-cleaner |
| Launch Ubuntu Cleaner | ubuntu-cleaner |
What usually fills the disk on Ubuntu
| Location | Typical contents | Safe to trim? |
|---|---|---|
/var/cache/apt/archives |
Downloaded .deb files |
Yes, with apt clean |
/var/lib/apt/lists |
Package index files | After apt clean only if you run apt update next |
~/.cache |
App thumbnails, pip, browser fragments | Often; apps rebuild caches |
/var/log and journal |
journald archives |
Yes, with journalctl --vacuum-* |
| Old Snap revisions | Disabled rows in snap list --all |
Yes, with snap remove name --revision=N |
| Trash | ~/.local/share/Trash |
Yes, when you do not need deleted files |
For a deeper pass on orphan packages, see remove unused packages on Ubuntu. For everyday apt maintenance, the three commands clean, autoclean, and autoremove cover most systems without extra software.
See what is using space first
Before you install a disk cleaner for Ubuntu, measure. See also check disk space on Linux for df and du patterns on other distros.
df -h /
du -sh ~/.cache /var/cache/apt/archives /var/log 2>/dev/null
journalctl --disk-usageOn my test host:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-ubuntu--lv 58G 42G 14G 76% /
1.1G /home/golinuxcloud/.cache
400M /var/cache/apt/archives
262M /var/log
Archived and active journals take up 176.6M in the file system.On a desktop, open Disk Usage Analyzer (baobab, package baobab):
baobabVersion on Ubuntu 25.04: baobab 48.0. It helps you find large directories interactively; it does not delete files for you.
Clean Ubuntu with apt (no extra tools)
This is the baseline every admin should know before adding BleachBit or Ubuntu Cleaner.
apt clean — drop cached package files
Preview what clean would delete:
sudo apt-get clean --dry-runDel /var/cache/apt/archives/* /var/cache/apt/archives/partial/*
Del /var/lib/apt/lists/partial/*
Del /var/cache/apt/pkgcache.bin /var/cache/apt/srcpkgcache.binRun it:
sudo apt cleanOn my system /var/cache/apt/archives went from 400M to 40K. Installed packages stay on disk; only the download cache disappears.
apt autoclean — remove outdated cached debs
sudo apt autocleanUseful when older .deb versions pile up; often returns quickly if the cache is already empty.
apt autoremove — drop orphaned dependencies
Preview:
sudo apt autoremove --dry-run0 upgraded, 0 newly installed, 0 to remove and 38 not upgraded.When packages would be removed, read the list before you confirm. After removing a large app such as LibreOffice, autoremove is where libuno and similar libraries actually leave.
Combined one-liner
sudo apt clean && sudo apt autoclean && sudo apt autoremove -yTrim systemd journal logs
Logs live under /var/log/journal and show up in journalctl --disk-usage. There is no --dry-run for vacuum—pick a limit explicitly:
journalctl --disk-usage
sudo journalctl --vacuum-time=7d
# or cap size:
sudo journalctl --vacuum-size=200MDo not vacuum to zero on a machine you are actively troubleshooting; keep enough history to debug service failures.
User cache and Snap revisions
Application caches under ~/.cache are safe to delete selectively when you accept that apps may rebuild them on next launch. Inspect size first:
du -sh ~/.cache/*Old Snap revisions show as disabled in:
snap list --all | awk '/disabled/{print $1, $2}'Remove a specific revision (example—use your name and revision from the list):
sudo snap remove firefox --revision=8462Repeat for each disabled revision you do not need. This is often worth hundreds of megabytes on desktop systems that auto-refresh snaps.
BleachBit — disk cleaner in Ubuntu universe
BleachBit is the closest widely packaged equivalent to Windows “disk cleanup” utilities on Ubuntu. It clears caches and junk files; it is not antivirus—see does Ubuntu need antivirus? if you need malware scanning. It is in universe on Ubuntu 25.04:
sudo apt update
sudo apt install -y bleachbit
bleachbit --versionBleachBit version 4.6.2List cleaners:
bleachbit --list | grep '^apt'apt.autoclean
apt.autoremove
apt.clean
apt.package_listsPreview before you delete
Always preview. Example for user caches:
bleachbit --preview system.cache 2>&1 | head -10Delete 12.3kB /home/golinuxcloud/.cache/seaborn/tips.csv
Delete 4.1kB /home/golinuxcloud/.cache/uv/interpreter-v4/...
...apt.package_lists can delete files under /var/lib/apt/lists/—that frees space but forces a full sudo apt update before the next install. Preview showed multi-megabyte index files on my host:
bleachbit --preview apt.package_lists 2>&1 | head -5Run a clean only after you are satisfied with the preview:
bleachbit --clean apt.clean
# GUI:
bleachbit --guiAfter I had already run apt clean, bleachbit --preview apt.clean reported 0B recoverable—expected, not a BleachBit failure.
Ubuntu Cleaner — janitor app from PPA
Ubuntu Cleaner is a GTK janitor inspired by the old Ubuntu Tweak cleaner. It is not in the default Ubuntu archive; install from ppa:gerardpuig/ppa:
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:gerardpuig/ppa
sudo apt update
sudo apt install -y ubuntu-cleanerOn Ubuntu 25.04:
ubuntu-cleaner:
Candidate: 1.1.4-1
500 https://ppa.launchpadcontent.net/gerardpuig/ppa/ubuntu plucky/main amd64 PackagesLaunch from the app menu or run:
ubuntu-cleanerCLI options are limited:
Usage: ubuntu-cleaner [options]
--version show program's version number and exit
-h, --help show this help message and exit
-d, --debug Generate more debugging information.Version on install:
ubuntu-cleaner 1.1.4Inside the GUI you pick categories (package caches, application caches, browser data—depending on plugins). There is no batch --preview flag; use the on-screen selections the same way you would in BleachBit’s GUI.
Caveats on current Ubuntu releases
The PPA build dates to 2022. Install may print Python SyntaxWarning lines from oldkernel_plugin.py. On launch you may see missing icon warnings (computerjanitor, gtk-execute) with the Adwaita theme—the window can still open on a full desktop session. Ubuntu Cleaner needs a graphical session; it is not a server tool.
For SSH-only hosts, use BleachBit CLI or plain apt/journalctl instead.
Ubuntu cleaning before imaging or cloning
When you prepare a VM template or golden image:
sudo apt clean && sudo apt autoremove -ysudo journalctl --vacuum-time=3d(or your retention policy)- Remove disabled snap revisions
- Empty Trash and clear
~/.cacheonly if the template should not ship user data - Optional: BleachBit preview for browsers and thumbnails
You do not have to install Ubuntu Cleaner solely for imaging—CLI steps above shrink the image reliably. GUI cleaners are convenience, not a requirement.
Remove Ubuntu Cleaner or BleachBit
sudo apt remove ubuntu-cleaner bleachbit
sudo apt autoremove -yDrop the PPA if you added it only for Ubuntu Cleaner:
sudo add-apt-repository --remove ppa:gerardpuig/ppa
sudo apt updateTroubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
apt update fails after BleachBit apt.package_lists |
Package indexes deleted | Run sudo apt update to rebuild lists |
Unable to locate package ubuntu-cleaner |
PPA not added | sudo add-apt-repository ppa:gerardpuig/ppa then apt update |
| PPA has no plucky suite | Old Ubuntu or typo | Use correct codename; check ls /etc/apt/sources.list.d/ |
ubuntu-cleaner exits on SSH |
GTK app needs display | Use bleachbit CLI or apt commands on servers |
journalctl: unrecognized option '--dry-run' |
Not supported | Use --disk-usage first; vacuum with explicit size/time |
| Freed little space after “clean all” | Data is in $HOME or Docker |
du -sh ~/*; prune containers/images separately |
| zsh glob errors on apt patterns | Shell expansion | Quote patterns passed to apt |
References
Summary
For Ubuntu cleaning, start with df, du, and journalctl --disk-usage, then run sudo apt clean, sudo apt autoremove -y, and targeted journal vacuum. Install BleachBit from universe when you want previews and scripted cleaners (bleachbit --preview, bleachbit --clean). Add Ubuntu Cleaner from ppa:gerardpuig/ppa only if you want a simple janitor GUI—version 1.1.4 on plucky, GUI-only, older but functional. Preview every GUI category before you wipe apt lists or browser data, and keep CLI maintenance as the foundation even when you install a disk cleaner app.









