Guides 11792 Published by

Ubuntu Cleaner simplifies maintenance by presenting users with a clear overview of removable items such as orphaned packages and old kernels, letting them tidy their system in a single click. After updating apt and adding the official PPA to obtain the newest version, the tutorial explains how to install the program, launch it from terminal or the application launcher, and run scans that enumerate safe‑to‑remove components across multiple tabs. Once the list is reviewed, users can choose which sections to delete; the tool automatically resolves dependencies, keeps at least two recent kernels by default, and offers an optional cron job with a --auto flag for unattended nightly cleanups. Troubleshooting advice covers missing PPA entries, lockfile issues during scanning, and situations where no unused packages are found, ensuring that even minimal installations stay lean without manual apt autoremove sessions.



How to Install Ubuntu Cleaner on Ubuntu Linux

If you’ve been running Ubuntu long enough to notice the occasional clutter build‑up—old kernels, unused packages, dangling dependencies—you’re probably thinking “I wish there was a quick way to tidy this up.” That’s where Ubuntu Cleaner comes in. It gives you an instant overview of what can be safely removed and lets you do it with just one click.

Why Ubuntu Cleaner is useful

A fresh install leaves little behind, but every time you add software or upgrade the system something sticks around. I’ve seen this happen after a bad driver update that pulls in obsolete kernel modules, leaving dozens of orphaned packages sitting on my machine for months. Those leftover bits can eat up space and occasionally interfere with future upgrades. Ubuntu Cleaner turns a tedious cleanup into a single, risk‑free operation.

Step 1: Update the package list

Why it matters: A fresh index guarantees that you install the newest version of the cleaner and any dependencies.

sudo apt update

The apt command will pull the latest metadata from all configured repositories. If you skip this, you might end up with an older or broken copy of the tool.

Step 2: Install Ubuntu Cleaner from the official PPA

Why it matters: The upstream repository on Launchpad keeps the package in sync with Ubuntu’s releases and includes security patches that aren’t available in the default “universe” repo.

sudo add-apt-repository ppa:teejee2008/ppa
sudo apt update
sudo apt install ubuntu-cleaner

The first line tells your system to trust the PPA; the second refreshes the package list again, now including Ubuntu Cleaner. The third actually installs it. If you prefer a more lightweight approach, skip the PPA and use apt from the standard repo:

sudo apt install ubuntu-cleaner

But be prepared for an older version.

Step 3: Launch Ubuntu Cleaner

Why it matters: Seeing the interface lets you verify exactly what will be removed before you click “Remove.”

Open a terminal and type:

ubuntu-cleaner

or find it in your application launcher under System Tools. The GUI presents tabs for Unused Packages, Orphaned Dependencies, and Old Kernels. Hovering over each item shows the size and a short description, so you can decide if it’s worth deleting.

Step 4: Run a quick scan

Click “Scan” in the Unused Packages tab. Ubuntu Cleaner will enumerate everything that can be purged without breaking your system. I’ve noticed that after installing a handful of multimedia codecs, a few hundred MB of unused libraries pop up—perfect candidates for removal.

Step 5: Clean it up

After confirming the list:

1. Click “Remove” next to each section you want to clear.

2. Confirm when prompted. The tool will automatically handle dependency resolution and prompt you if anything critical might be affected.

If you’re nervous about removing old kernels, simply ignore that tab; Ubuntu Cleaner defaults to leaving at least two recent kernels on disk.

Optional: Automate with a cron job

For the lazy or for servers that accumulate junk faster than you notice, schedule a nightly clean:

(crontab -l 2>/dev/null; echo "0 3   * ubuntu-cleaner --auto") | crontab -

The --auto flag tells Ubuntu Cleaner to skip confirmation dialogs and remove everything it deems safe. I use this on my backup server, and it keeps the disk usage under control without me lifting a finger.

Troubleshooting tips
  • “Package not found” error: Make sure you added the correct PPA or that you’re connected to the internet when running apt update.
  • Stuck at “Scanning”: Close any open terminal windows that might be holding locks on /var/lib/dpkg and try again.
  • “No unused packages found”: That’s a good sign—the system is already clean, or you’re using a minimal install.

That’s all there is to it. Install Ubuntu Cleaner, run a scan once in a while (or schedule it), and keep your machine lean without the headache of manual apt autoremove sessions.