The BleachBit logo.

Want to safely delete unnecessary files from your Linux operating system, reclaim hard-drive space, and protect your privacy? BleachBit does all of this for you!

Why Not Use rm?

Of course, you can also use rm to delete all unwanted or unnecessary files from your system. However, the benefit of using BleachBit is it scans your hard drive for specific file types, and then deletes only those types. This means you don’t have to go looking for them, nor do you have to check all the locations in your file system, as you have to do with rm. Any momentary lapse of concentration while using rm can be disastrous.

BleachBit, on the other hand, is constrained to only delete files that can be safely removed, and it knows where they reside in the file system. It searches the appropriate locations for you and shows you a preview of what it’s going to delete before it does so.

This tool categorizes the file types into groups, and you can select or deselect entries in each category. This defines the types of files for which BleachBit will search. The categories you see will vary by distribution according to the applications you have installed on your computer.

For example, excess files from package managers are good candidates for being purged from your system. However, you’ll only see the apt category when BleachBit is running on Ubuntu and other Debian-derived distributions. This is because it wouldn’t make sense to show that category on something like Fedora.

Rather, the dnf and yum categories will be displayed. Likewise, you won’t see a category for Chromium unless you have the Chromium browser installed on your computer.

Deleting these files not only frees up some disk space, but it also helps you maintain your privacy by removing records of your activities.

Installing BleachBit

To install BleachBit in Ubuntu, use this command:

sudo apt-get install bleachbit

To install BleachBit on Manjaro, type this:

sudo pacman -Syu bleachbit

To install BleachBit on Fedora, the command is:

sudo dnf install bleachbit

At this writing, the BleachBit version for Fedora 32 hasn’t yet been added to the repository. If you’re on Fedora 32, you can do the following to install BleachBit:

  • Double click the file in the “Downloads” folder.

The BleachBit installation file in the "Downloads" folder.

  • After the Software application opens the file, click “Install.”

The BleachBit "Install" option in the Software application.

Starting BleachBit

If you use sudo to launch BleachBit, it will be able to access system temporary and log files, as well as files that belong to the root account.

If you launch BleachBit without sudo, it operates only on files that belong to you and the account you’re currently logged into. BleachBit displays more categories of files when you run it under a normal user account. This is because it will include user-specific files from applications you might have installed, such as Firefox and Thunderbird.

Type the following to use sudo to launch BleachBit:

sudo bleachbit

Type the following to launch BleachBit without sudo:


Setting Preferences

After the first launch, you’ll see the “Preferences” dialog box, in which you can configure BleachBit. You can access these settings any time by selecting “Preferences” from the hamburger menu on the main screen.

The "General" tab in the BleachBit preferences dialog box.

You’ll see the following options:

  • “General”: Here, you can choose whether you want BleachBit to perform the following actions:
    • Check for updates (including Beta releases).
    • Show or hide file categories for all supported applications, whether they’re installed or not.
    • Exit after performing deletions.
    • Require confirmation before deleting files.
    • Use ISO/IEC or SI units for file sizes.
    • Use Dark mode.
    • Show debugging information during its actions.
  • “Custom”: Choose whether to add files or folders, as well as which are selectable, and which can be included or excluded from the scan and delete actions. You can also include locations that aren’t offered by BleachBit by default.
  • “Drives”: BleachBit can overwrite free space and make the data there unrecoverable. For each partition in your file system, you must create a writable folder and add its path to this tab. If your file system only has a single partition, the default values will be fine.
  • “Languages”: All the languages available in your Linux distribution will be listed under this tab, so just select those you want to enable. Your default language will already be selected. BleachBit will also offer to remove any that aren’t selected.
  • “Whitelist”: Under this tab, you can specify locations you want BleachBit to ignore, and they’ll remain untouched.

Using BleachBit

The BleachBit main window has two panes: the list of file categories on the left, and the options within each category on the right. You can click the checkbox beside any option to select it, or click a category name to select all of its options.

If you select an option that will take a long time to complete, or one that might affect stored passwords, you’ll see a notification. You can still choose those options, but BleachBit is just making sure you know what they do.

The "BleachBit" main menu.

When you highlight a category, BleachBit displays a description of the options within it in the pane on the right. You can scroll through the categories and options, and select the file types you want to clean.

The "Passwords" category highlighted under "Firefox" on the left and the options on the right.

We’ve selected options to delete files for Firefox, but leave the password settings the same. We’ve done the same for Thunderbird.

The "Passwords" category highlighted under "Thunderbird" on the left and the options on the right.

After you make your selections, click “Preview,” and BleachBit will perform a dry run.

It will scan the file system according to the configuration and options you selected. You’ll then see a report that includes the number of files it expects to delete, and the amount of hard drive space that will be freed as a result. The values are shown as hard drive space per selected option, and as a total in the pane on the right.

The amount of hard-drive space expected to be free after a BleachBit scan.

If you’re satisfied with the information and want to proceed, click “Clean.” If you previously selected the “Confirm Before Delete” configuration option, BleachBit will ask if you’re sure you want to proceed.

Click “Delete” to delete the files, or “Cancel” to return to the main BleachBit window.

The file deletion confirmation dialog box in BleachBit.

If you click “Delete,” BleachBit will carry out the cleanup and delete the files from your system. If you previously selected any of the secure erasing or overwriting options, this might take some time. However, keep in mind that most modern journaling filesystems make it very difficult to guarantee that deleted files have been overwritten.

After BleachBit completes its scan and delete actions, it will report how many files it deleted and how much hard drive space is now free.

The Main BleachBit window showing the number of deleted files and hard drive space recovered.

RELATED: How to Securely Delete Files on Linux

Repeat, as Necessary

The temporary and log files, and other disposables BleachBit removes will be replaced and re-created as you continue to use your computer. Over time, they’ll build up again. But now, you can use BleachBit periodically to keep them in check.

Profile Photo for Dave McKay Dave McKay
Dave McKay first used computers when punched paper tape was in vogue, and he has been programming ever since. After over 30 years in the IT industry, he is now a full-time technology journalist. During his career, he has worked as a freelance programmer, manager of an international software development team, an IT services project manager, and, most recently, as a Data Protection Officer. His writing has been published by,,, and Dave is a Linux evangelist and open source advocate.
Read Full Bio »