Want to safely remove unnecessary files from your Linux OS, reclaim hard drive space, and protect your privacy? Bleachbit does all this for you!
Why not use rm?
Of course, you can also use
rm to remove all unwanted or unnecessary files from your system. However, the benefit of using Bleachbit 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 on your filesystem, like you have to do with
rm. Any momentary lapse of concentration while wearing
rm it can be disastrous.
BleachBit, on the other hand, is limited to deleting only files that can be safely deleted, and it knows where they reside on the file system. It searches for the appropriate locations and shows you a preview of what to delete before doing so.
This tool classifies file types into groups and you can select or deselect entries in each category. This defines the types of files that BleachBit will search for. The categories you see will vary by distribution based on the applications you have installed on your computer.
For example, leftover files from package managers are good candidates to be removed from your system. However, you will only see the
apt category when BleachBit runs on Ubuntu and other Debian-derived distributions. This is because it would not make sense to display that category in something like Fedora.
yum The categories will be displayed. Similarly, 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 deleting logs of your activities.
To install BleachBit on 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 the time of writing, the Fedora 32 version of BleachBit has not yet been added to the repository. If you are on Fedora 32, you can do the following to install BleachBit:
- Double click on the file in the “Downloads” folder.
- After the software application opens the file, click “Install”.
If you use
sudo To start BleachBit, you will be able to access the system registry and temporary files, as well as files owned by the root account.
If you start BleachBit without
sudo, operates only on files that belong to you and the account you are 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 may have installed, such as Firefox and Thunderbird.
Type the following to use
sudo to start BleachBit:
Type the following to start BleachBit without
After the first launch, you will see the “Preferences” dialog, in which you can configure BleachBit. You can access these settings at any time by selecting “Preferences” from the hamburger menu on the main screen.
You will see the following options:
- “General”: Here, you can choose whether you want BleachBit to do the following:
- “Personalized”: Choose whether to add files or folders, as well as which ones can be selected and which ones can be included or excluded from scan and delete actions. You can also include locations that BleachBit doesn’t offer by default.
- “Drives”: BleachBit can overwrite the free space and make the data there unrecoverable. For each partition on your file system, you need to create a writable folder and add its path to this tab. If your filesystem only has one partition, the defaults will be fine.
- “Languages”: All the languages available on your Linux distribution will be listed on this tab, so just select the ones you want to enable. Your default language will already be selected. BleachBit will also offer to remove any that are not selected.
- “White list”: On this tab, you can specify the locations that you want BleachBit to ignore and they will remain intact.
The main BleachBit window has two panels: the list of file categories on the left and the options within each category on the right. You can click the checkbox next to 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 may affect stored passwords, you will see a notification. You can still choose those options, but BleachBit just makes sure you know what they do.
When you highlight a category, BleachBit displays a description of the options within it in the right pane. You can scroll through the categories and options, and select the file types you want to clean.
We have selected options to delete files for Firefox, but leave the password settings the same. We have done the same with Thunderbird.
After making your selections, click “Preview” and BleachBit will run a rehearsal.
It will scan the file system according to the settings and options you selected. You will then see a report that includes the number of files you expect to delete and the amount of hard drive space that will be freed up as a result. Values are displayed as hard drive space per selected option and as a total in the right pane.
If you are satisfied with the information and want to continue, click “Clear”. If you previously selected the “Confirm before delete” configuration option, BleachBit will ask you if you are sure you want to continue.
Click “Delete” to delete the files, or “Cancel” to return to the main BleachBit window.
If you click “Delete”, BleachBit will clean up and remove the files from your system. If you previously selected any of the secure erase or overwrite options, this may take some time. However, keep in mind that most modern journaling file systems make it very difficult to ensure 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 free hard drive space is left now.
RELATED: How to Safely Delete Files in Linux
Repeat as needed
The temporary, registry, and other disposable files that BleachBit removes will be replaced and recreated as you continue to use your computer. Over time, they will accumulate again. But now, you can use BleachBit periodically to keep them under control.