Free up disk space on Ubuntu with BleachBit
Most Ubuntu installations stay tidy for a while, then quietly start filling up. Old kernels pile in /boot, browser caches swell, and forgotten downloads sit in ~/Downloads for months. BleachBit has been a graphical cleanup tool for over a decade, and it remains one of the simplest ways to claw back gigabytes without poking around the file system blind.
What separates BleachBit from the average "PC cleaner" is its transparency. Every checkbox is labelled, every action is documented, and nothing happens until you press the preview button. The interface looks plain, almost utilitarian, and that plainness is the point: it tells you, plainly, what it is about to do to your system.
For readers in Australia on NBN data caps, every gigabyte on the local drive matters when an update hits and the connection slows down. It also means photo and video collections from a trip to the Blue Mountains or a weekend in Hobart do not have to be shuffled off to an external drive just to install a security patch.
BleachBit is open source and available in the default Ubuntu repositories, the Snap store, and as a flatpak from Flathub, so installation is rarely a hurdle. This walkthrough covers what it does, how to install it, what every checkbox means, and a few habits worth keeping in mind.
What BleachBit does and why it matters
BleachBit is a wrapper around a long list of safe-to-delete locations scattered across a typical Linux desktop. Rather than asking you to remember that Firefox stores its cache under ~/.cache/mozilla/firefox/ or that the thumbnail generator keeps old previews in ~/.cache/thumbnails, it bundles those paths into neat toggles. Tick the ones you want, hit preview, and a list appears showing which files would be removed and how much space they consume.
Beyond the obvious caches, BleachBit also tackles less obvious culprits. It can clear the apt package cache, rotate and shrink old systemd journal logs, vacuum the recent documents list, and wipe the trashes of multiple file managers at once. There is also a "free disk space" option that overwrites the empty sectors on a drive, which is handy before selling a laptop or passing an old SSD to a family member in Perth or Adelaide.
The tool is not magic. The first run on a fresh install usually recovers only a few hundred megabytes. The real value shows up on systems that have been running for months, where the cumulative bloat from package installs, browser sessions, and system updates can easily reach five or ten gigabytes. For a home user on a 256 GB laptop, that is the difference between getting an update through and being forced to clean up by hand first.
Installing BleachBit on Ubuntu
The fastest route is the Snap. Open a terminal and run sudo snap install bleachbit, which pulls the latest stable build from the Snapcraft servers. The snap is confined, which means a couple of system-level cleanups require an extra step. The snap also installs a desktop entry, so BleachBit appears in your application menu alongside other system tools.
The traditional Debian package is also available, and many long-time Ubuntu users prefer it because the apt cache cleaner has full access to /var/cache/apt. Run sudo apt install bleachbit after refreshing the package lists. The upstream project also offers a .deb on its official site, installable with sudo dpkg -i bleachbit_*.deb followed by sudo apt -f install to pull in any missing dependencies.
A flatpak build is available on Flathub if you already use that ecosystem. Whichever route you choose, you can launch BleachBit either from the application menu or by typing bleachbit in a terminal. For the deep clean features, launch it as root with sudo bleachbit, which unlocks the options for cleaning caches shared across all user accounts on the machine.
The first run: understanding the cleaner options
The first time BleachBit opens, you are greeted with a long list of checkboxes grouped roughly by application. You will see entries for APT, bash, deep scan, desktop entries, Firefox, Google Chrome, LibreOffice, the Linux kernel, systemd journals, thumbnails, and many more. Each item has a description underneath that explains what will be removed. Read those descriptions before ticking anything, because some options are more aggressive than they sound.
A good starting point is the apt cache. Ubuntu keeps every downloaded .deb in /var/cache/apt/archives so a re-install does not require re-downloading. Over time this folder grows large, especially with lots of software installs and removals. The "APT" section has two checkboxes: one to clean the package cache and another to remove obsolete packages. Both are safe on a stable system that is not mid-upgrade.
Below that sits "systemd journals," which controls how much of the system log history is retained. The default on Ubuntu keeps a few hundred megabytes, and on a busy server this can grow much larger. Shrinking the journal to the past two weeks is usually a sensible setting. Other common picks include browser caches, the thumbnail cache, and the trash folders for the desktop environments you use.
Targeting common space hogs like APT and browser caches
The two biggest space hogs on a typical Ubuntu laptop are usually the apt cache and the browser cache. The apt cache lives at /var/cache/apt/archives and can quietly grow past two or three gigabytes. The browser cache lives under ~/.cache and varies wildly depending on which browser you use. Someone who spends the evening streaming AFL replays on a sports site will accumulate a substantial media cache in no time.
For the apt cache, BleachBit runs apt-get clean, which removes every cached .deb except the lock file. This is safe and reversible: the next package install simply re-downloads what it needs. For the browser cache, BleachBit reads the cache directory of each detected browser and deletes the contents. The first run after several months of use can recover several gigabytes for a heavy browser user.
The thumbnail cache is a quieter offender. Every time you open a folder containing photos or videos, the file manager generates tiny preview images and stores them in ~/.cache/thumbnails. The cache is supposed to prune itself, but on most systems it slowly grows into the hundreds of megabytes. Ticking the thumbnails box in BleachBit resets it entirely, and the file manager will rebuild the previews on demand.
Privacy features worth knowing about
The privacy side of BleachBit is what gave the tool its name, and it remains one of its strongest selling points. The "Shred" option in the file menu overwrites a file or folder before deleting it, which makes recovery much harder. There are several overwrite patterns available, ranging from a single pass to the 35-pass Gutmann method. For most users, a single pass is enough to defeat casual recovery, and the multi-pass options exist mainly for older mechanical drives.
The "Wipe free space" tool is the privacy-oriented counterpart to the regular clean. It scans the empty areas of a drive and overwrites them with random data, which scrubs any traces of files deleted in the past. Running this on a 1 TB drive can take many hours, so schedule it for an evening when the laptop will be left on the desk. Many users run it once before selling or donating a machine.
There is also a "Make /tmp Shred" option, which configures the system to treat /tmp as a tmpfs mount that lives in RAM. Anything written to /tmp is then automatically wiped on reboot. The trade-off is usually worth it on a personal laptop but is best left off on a production server.
Scheduling automatic cleanups
BleachBit has a built-in scheduler that can run a chosen set of cleanups automatically. On a personal laptop, the most useful schedule is a weekly run of the apt cache, browser cache, and thumbnails. That keeps the system from drifting back to its bloated state without the user having to launch the application. The scheduler writes the chosen options into ~/.config/bleachbit so the run is reproducible.
For a small business in Sydney or Melbourne with a fleet of Ubuntu workstations, the scheduler can be combined with a root-level configuration file. Drop a bleachbit.ini in /etc/bleachbit that lists the cleanups you want, then point the scheduler at it. The application runs the same routine on every machine, which keeps storage usage predictable and avoids the surprise of a desktop refusing an update because the disk is full.
Scheduling is also a good way to handle the long-running jobs like wiping free space. Those are best left to run overnight, or even better, late on a Sunday evening when the AEST/AEDT change is unlikely to interrupt anything. A weekly lightweight run, with a monthly deeper clean, tends to be the right rhythm for most home users.
Tips, cautions and when to skip the clean button
A few boxes in BleachBit deserve caution. The "Memory" and "Swap" options clear the contents of RAM and the swap partition, which can cause running applications to crash. Leave those off unless you specifically need them. The "Recent documents" list is also worth being careful with: clearing it is useful for privacy, but if you rely on the recent files menu in LibreOffice or the file manager, you will find it empty afterwards.
BleachBit will not warn you about a setting that is dangerous to the system, because the developers consider every option safe in the sense that no checked box will silently corrupt your installation. The risk is more about convenience: clearing a cache that another tool relies on can cause that tool to re-download or re-index. For example, wiping the entire thumbnail cache forces the file manager to rebuild previews for every folder.
Running BleachBit as root is required for some features, but the root session can clean caches belonging to other users. If you share a desktop with family members, ask before clearing their browser caches, or better, leave per-user caches to each user to manage themselves. The cross-user cleaning is most useful on a single-account machine or on a freshly reimaged system that is being prepared for handover.
Remember that BleachBit is a maintenance tool, not a silver bullet. Pair it with sensible habits: keep the apt cache modest, prune the Downloads folder monthly, and check the disk usage analyser in GNOME Settings when something feels slow. The same routine, alongside a broader set of Ubuntu maintenance habits, is documented at ubuntunext.com. A quick clean every few weeks keeps Ubuntu feeling responsive, and the next time an update lands on a Tuesday evening in Sydney or a Friday night in Adelaide, your machine will have the room it needs.