How to Install Ubuntu Cleaner on Ubuntu Linux

Ubuntu Cleaner helps you reclaim disk space and keep your system running smoothly by removing old kernel versions, clearing package caches, and deleting temporary files that accumulate over time. Whether you need to free up storage after months of system updates, clean browser caches for privacy, or simply maintain a lean installation, Ubuntu Cleaner provides a straightforward graphical interface that makes these tasks accessible. By the end of this guide, you will have Ubuntu Cleaner installed and ready to optimize your Ubuntu system.

This guide supports Ubuntu 22.04 LTS and 24.04 LTS installations. The Gerard Puig PPA may not provide packages for newer or older Ubuntu releases. Commands shown work identically on both supported LTS releases.

Update Ubuntu Before Installation

First, update the package lists and upgrade any outdated packages on your system. This step minimizes the chances of dependency conflicts when installing Ubuntu Cleaner from the PPA:

sudo apt update && sudo apt upgrade

Add the Ubuntu Cleaner PPA

Next, add the official Ubuntu Cleaner PPA to your system. A Personal Package Archive (PPA) is a community-maintained repository hosted on Launchpad that provides packages not included in Ubuntu’s default repositories. The Ubuntu Cleaner PPA, maintained by Gerard Puig, provides the latest stable release:

sudo add-apt-repository ppa:gerardpuig/ppa -y

The -y flag automatically confirms the PPA addition, which is useful for scripted deployments but means you will not see a confirmation prompt. After adding the PPA, refresh the package lists so APT recognizes the newly available packages:

sudo apt update

Install Ubuntu Cleaner

With the PPA configured, install Ubuntu Cleaner using the following command:

sudo apt install ubuntu-cleaner

Once the installation completes, you can verify that APT recognizes the package by checking its status. This step confirms the PPA is working correctly:

apt-cache policy ubuntu-cleaner

As a result, you should see output similar to the following (your version number may differ):

ubuntu-cleaner:
  Installed: 1.x.x-1
  Candidate: 1.x.x-1
  Version table:
 *** 1.x.x-1 500
        500 https://ppa.launchpadcontent.net/gerardpuig/ppa/ubuntu noble/main amd64 Packages
        100 /var/lib/dpkg/status

Launch Ubuntu Cleaner

Launch from Terminal

To start Ubuntu Cleaner from the command line, simply run the following command:

ubuntu-cleaner

Launch from Applications Menu

Alternatively, desktop users who prefer a graphical approach can open Ubuntu Cleaner through the Activities overview. Simply search for “Ubuntu Cleaner” in the applications search field and then click the icon to launch it.

Manage Ubuntu Cleaner

Update Ubuntu Cleaner

Because Ubuntu Cleaner is installed via APT, it updates automatically alongside your other system packages. However, to manually check for and apply updates, run the standard system update command:

sudo apt update && sudo apt upgrade

Remove Ubuntu Cleaner

If you no longer need Ubuntu Cleaner, remove the package with the following command:

sudo apt remove ubuntu-cleaner

After removing the package, clean up any orphaned dependencies that were installed alongside Ubuntu Cleaner:

sudo apt autoremove

Remove the Ubuntu Cleaner PPA

To completely remove the PPA from your system, use the following command. Only proceed if you have not installed other applications from this repository:

sudo add-apt-repository --remove ppa:gerardpuig/ppa -y

Next, refresh the package cache after removing the repository:

sudo apt update

Finally, verify the PPA has been removed by checking for the package:

apt-cache policy ubuntu-cleaner

After PPA removal, this command produces no output (or shows only stale dpkg status entries with no available candidate), confirming the repository is no longer active.

For more details on managing PPAs, including how to list and remove multiple repositories, see our guide on removing PPAs from Ubuntu.

Troubleshoot Ubuntu Cleaner

Firefox Cache Not Detected

If Firefox does not appear in Ubuntu Cleaner’s browser cache options, you are likely using the Snap version of Firefox (the default on Ubuntu 22.04 and newer). Ubuntu Cleaner looks for Firefox cache in ~/.mozilla/firefox/, but Snap Firefox stores its data in ~/snap/firefox/ instead.

Verify which cache location contains data:

du -sh ~/.mozilla/firefox/*/cache2/ 2>/dev/null || echo "No traditional Firefox cache"
du -sh ~/snap/firefox/common/.cache/ 2>/dev/null || echo "No Snap Firefox cache"

If the Snap path shows cache data, Ubuntu Cleaner cannot detect it automatically. To clear Snap Firefox cache manually:

rm -rf ~/snap/firefox/common/.cache/*

Alternatively, BleachBit has better support for Snap application paths and can clean Firefox cache regardless of installation method.

Alternatives to Ubuntu Cleaner

If you need more advanced cleaning options or prefer a different tool, BleachBit offers similar functionality with additional features like secure file deletion and support for cleaning application-specific data. Additionally, BleachBit is available in Ubuntu’s default repositories and therefore does not require adding a PPA.

Conclusion

Ubuntu Cleaner provides a simple way to reclaim disk space by removing old kernels, clearing APT caches, and deleting browser data. Because the PPA-based installation keeps the application updated automatically, maintenance is minimal. Furthermore, removal is straightforward when you no longer need it. Regular use helps maintain a clean system and prevents storage bloat from accumulated temporary files.

4 thoughts on “How to Install Ubuntu Cleaner on Ubuntu Linux”

  1. OS NAME = Ubuntu 22.04.5 LTS
    Excuse me, but I found a problem in that command and i found that this following command actually works “sudo add-apt-repository -s -P ppa:gerardpuig/ppa -y”

    Best of the bestest,
    Ethan

    Reply
    • Thanks for the feedback, Ethan. I tested the standard command on a fresh Ubuntu 22.04.5 container and it works correctly:

      sudo add-apt-repository ppa:gerardpuig/ppa -y

      Your alternative command with -s -P also works, but the flags are unnecessary for most users. The -s flag enables downloading source packages (deb-src entries), and -P is an explicit PPA flag that is redundant when already using the ppa: prefix in the argument.

      If the standard command failed for you, the issue was likely environment-specific. Common causes include network connectivity issues during key retrieval, missing software-properties-common package, or GPG keyserver timeouts. If you encounter similar issues in the future, running the command without -y first lets you see any error messages before automatic confirmation.

      Reply
  2. Joshua James, Thank you.

    “Cleans browser cache for Firefox, Chrome, and more, protecting your online privacy.”

    Unable to Post a Screenshot here, But… the Only Apps it shows to clean are “Chrome Cache” and “Thunderbird Cache”. I use Firefox and Evolution.

    Could have missed something but thought I’d let you know. Best, Jim

    Reply
    • Thanks for the observation, Jim. This is likely because you are using the Snap version of Firefox, which is the default on Ubuntu 22.04 and newer. Ubuntu Cleaner was designed before Snap became the default and looks for Firefox cache in ~/.mozilla/firefox/, but Snap Firefox stores its cache in ~/snap/firefox/ instead.

      You can verify this with:

      du -sh ~/.mozilla/firefox/*/cache2/ 2>/dev/null || echo "No traditional Firefox cache"
      du -sh ~/snap/firefox/common/.cache/ 2>/dev/null || echo "No Snap Firefox cache"

      If the Snap path shows cache data but the traditional path does not, that confirms the detection limitation. For Evolution, check ~/.cache/evolution/ to see if cache data exists there. Ubuntu Cleaner only displays applications where it finds cache data in the paths it knows about.

      For Snap Firefox cleanup, you can manually clear the cache with rm -rf ~/snap/firefox/common/.cache/* or use BleachBit, which has better support for Snap application paths. I have added a troubleshooting section to the article explaining this limitation.

      Reply

Leave a Comment