Want to safely delete unnecessary files from your Linux operating system, regain 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 delete all unwanted or unnecessary files from your system. However, the benefit of using BleachBit is to scan your hard drive for certain types of files, and then only delete those types. This means you don’t need to search for them, you also don’t need to check all locations in your file system, like you have to do with rm. A momentary loss of concentration when using rm can be disastrous.
BleachBit, on the other hand, is limited to deleting files that can be deleted safely, and it knows where they are in the file system. It looks for a location that is suitable for you and shows you a preview of what will be deleted before doing so.
This tool categorizes file types into groups, and you can select or deselect entries in each category. This defines the type of file that BleachBit will look for. The categories that you see will vary based on distribution according to the application that you have installed on your computer.
For example, excess files from the package manager are good candidates for removal from your system. However, you only see the apt category when BleachBit runs on Ubuntu and other Debian derived distributions. This is because it doesn’t make sense to show that category to something like Fedora.
Instead, the dnf and yum categories will be displayed. Likewise, you will not see categories for Chromium unless you install the Chromium browser on your computer.
Removing these files not only frees up some disk space, but also helps you maintain your privacy by deleting records 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
As of this writing, the BleachBit version for Fedora 32 has not been added to the repository. If you are using Fedora 32, you can do the following to install BleachBit:
- Click “Fedora 31” on the BleachBit website to download the file.
- Double-click the file in the “Downloads” folder.
- After the Software application opens the file, click “Install.”
If you use sudo to launch BleachBit, it will be able to access the temporary system and record the files, as well as the files included in the root account.
If you launch BleachBit without sudo, it only operates on files that belong to you and the account that is currently logged in. BleachBit displays more file categories when you run them under a normal user account. This is because this will include user-specific files from applications that you might have installed, such as Firefox and Thunderbird.
Type the following to use sudo to launch BleachBit:
Type the following to launch BleachBit without sudo:
After the first launch, you will see a “Preferences” dialog box, where 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:
Check for updates (including Beta releases).
Show or hide file categories for all supported applications, whether installed or not.
Exit after deletion.
Requires confirmation before deleting files.
Use ISO / IEC or SI units for file size.
Use Dark mode.
Show debug information during its action.
- “Custom“: Choose whether to add files or folders, as well as which can be selected, and which can be included or excluded from scanning and deletion actions. You can also enter locations that are not offered by BleachBit by default.
- “Drive“: BleachBit can overwrite free space and make data there cannot be recovered. For each partition in your file system, you must create a writable folder and add the path to this tab. If your file system has only one partition, the default value will be fine.
- “Languages“: All languages available in your Linux distribution will be listed under this tab, so just select what you want to activate. Your default language will already be selected. BleachBit will also offer to delete those that are not selected.
- “Whitelist“: Under this tab, you can specify the locations that you want BleachBit to ignore, and they will remain untouched.
The BleachBit main window has two panes: a list of file categories on the left, and options in each category on the right. You can click the checkbox next to any option to select it, or click the category name to select all options.
If you choose an option that takes a long time to complete, or that might affect your saved password, all see a notification. You can still choose these options, but BleachBit only makes sure you know what they are doing.
When you highlight a category, BleachBit displays a description of the options in it in the panel on the right. You can scroll through categories and options, and choose the file type you want to clean.
We have chosen the option to delete files for Firefox, but keep the password settings the same. We have done the same for Thunderbird.
After you make a selection, click “Preview,” and BleachBit will run dry.
This will scan the file system according to the configuration and options you selected. You will then see a report that includes the number of files you want to delete, and the amount of hard drive space that will be freed as a result. Values are displayed as hard drive space per selected option, and as totals in the panel on the right.
If you are satisfied with the information and want to continue, click “Clean.” If you previously selected the “Confirm Before Delete” configuration option, BleachBit will ask if you are sure you want to continue.
Click “Delete” to delete the file, or “Cancel” to return to the BleachBit main window.
If you click “Delete,” BleachBit will clean up and delete files from your system. If you have previously selected a delete or override safe option, this might take time. However, keep in mind that most modern journal filesystems make it very difficult to guarantee that deleted files have been overwritten.
After BleachBit completes its scanning and deletion actions, BleachBit will report how many files were deleted and how much hard drive space is now free.
Repeat, as needed
Temporary and log files, and other disposable BleachBit deletions will be replaced and regenerated as you continue to use your computer. Over time, they will build again. But now, you can use BleachBit regularly to make sure.