SEARCH

How-To Geek

7 Tips to Get the Most Out of BleachBit, a “CCleaner for Linux”

image

Like CCleaner on Windows, BleachBit frees space by deleting unimportant files and helps maintain your privacy by deleting sensitive data. And, just like CCleaner, there’s more you can do with BleachBit than just clicking a single button.

BleachBit is available in Ubuntu’s Software Center and most other Linux distributions’ software repositories. You can also download it from the BleachBit website – it even runs on Windows, too.

Basic Cleaning

Select the type of data you want to remove in BleachBit’s sidebar after launching it. Unlike CCleaner, BleachBIt doesn’t automatically select or recommend certain types of data to delete. BleachBit works with system-wide data as well as application-specific data – for example, for web browsers such as Firefox.

image

BleachBit warns you if you select an option that’s slow or may have other problems.

image

You should run a preview by clicking the Preview button before running an actual Clean operation. Verify that Bleachbit isn’t deleting any important files you want to keep.

image

File Shredding

Instead of deleting files normally, you can go into BleachBit’s preferences window (Edit –> Preferences) and enable the Overwrite files to hide contents option. This is equivalent to “shredding” files, as some programs refer to it. Programs normally delete files by marking them as deleted, leaving them on the disk for file-recovery utilities to potentially recover. The overwrite option overwrites the files with useless data, preventing recovery. The files may still be recoverable if a copy of them existed elsewhere on the system and that copy wasn’t overwritten, so there’s no guarantee that the data will be completley unrecoverable if you overwrite it – nevertheless, if you’re worried about file-recovery utilities, this is a helpful feature. The downside is that overwriting files is significantly slower than just marking them as deleted, which is why operating systems don’t overwrite all deleted files in the first place.

image

Wiping Free Disk Space

Like CCleaner, BleachBit includes an option to overwrite free disk space with useless data. This overwrites deleted files that are lurking in the free disk space, ensuring files deleted by other applications are overwriten. To enable this feature, use the Drives tab in the Preferences window to add a writable folder on each partition on your system. If you only have a single drive, the default settings will work fine. If you have a different partition mounted at /partition, you’ll need to add a folder inside /partition to this list.

image

After configuring the options on the Drives tab, enable the Free disk space option under System. As you’d expect, this option is very slow – so BleachBit warns you.

image

Quick Shredding & Wiping

You can also shred individuals files and folders and wipe partitions from BleachBit’s File menu. Select Shred Files, Shred Folders, or Wipe Free Space to run an operation immediately.

image

Deleting System Files

If you try to remove system files like localizations (see below) or APT package data, you’ll see permission-denied errors if you’re running BleachBit as your standard user account.

image

BleachBit has no built-in way of asking for elevated privileges. To delete these files, you’ll need to run BleachBit as root – you may have a BleachBit as Administrator option in your menu. If you don’t have this option – for example, on Ubuntu – you’ll need to run BleachBit as root manually. To do this on Ubuntu, close BleachBit, press ALT+F2, type gksu bleachbit, and press Enter.

image

Once it’s launched, you can delete APT cache data, localizations, and other data in system directories. One caveat – BleachBit won’t see your personal data while running as root. You’ll need to close the BleachBit window and run BleachBit normally to delete your browser data and other user-specific data.

image

Deleting Languages

Your system probably has localization files for a wide variety of languages on it. While this normally isn’t a huge problem and doesn’t take up a large amount of disk space, it does use some. For example, on a fairly standard Ubuntu 12.04 system, BleachBit offers to delete 54MB of language files with its default settings. If you’re feeling squeezed for space, deleting language files can free up a bit. To use this feature, enable the Localizations option under System.

You can select the languages you want to keep on the Languages tab in the Preferences window. Just check the languages you want to keep – BleachBit will remove everything else.

image

If you’re deleting system data to free up space, you should also check out the APT category near the top of the window to remove unneeded software packages.

Command-Line Interface

BleachBit has a command-line interface, too. From a terminal window, you can run bleachbit -l to list all available cleaners.

image

Use the bleachbit -c command, followed by a list of cleaners, to run the cleaners. For example, to run all Firefox cleaners and delete your Chromium browser history, you’d run the following command:

bleachbit -c firefox.* chromium.history

image

Like other terminal commands, you could integrate this command into a script to run BleachBit automatically in the background.

Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.

  • Published 06/19/12

Comments (11)

  1. tech27

    Wow! This is great. I have been using this cleaner before but doesn’t really understand some of its functions and features. Good Stuffs !

  2. Jeremy

    Another reason why HTG is great. The constant mix of Windows, Linux and Mac content. Thanks for this! I never even thought about a CCleaner for Linux.

  3. cam2644

    Keep up the good work with all this great info. Thanks

  4. Anonymous

    Are there any other CCleaner-like utilities for Linux? Something more taylored to something like Fedora / Red Hat or Open SuSE? I assume distros like Slackware and possibly other xNIX OS’s like the various BSD strains probably don’t need stuff like this. Or do they?

    I sure wish HTG could stop using Ubuntu all the time when it comes to illustrating Linux apps. If you have to settle on one distro then I suppose Ubuntu might be OK. But personally, I just can’t stand some of the features in Ubuntu (like it’s Mac-like left side window buttons and non Gnome/KDE like menus) since there’s no easy way to configure them. And it’s getting harder each release to configure/modify Ubuntu to what I like too. So why not use the grand daddy of them all, Debian? Or even Linux Mint?! Why illustrate these apps using Ubuntu? (Is there no love for the rest of the Linux world?)

  5. Amit Shreyas

    oooo , ccleaner type apps is available in ubuntu…i think , BleachBit is good for privacy & security purpose.

  6. Sysgeek

    This is great! It is exactly what I needed to zero out disk space on my Linux VMs. I could finally shrink my bloated testbed VM! Down 50GB! Thank you for the great find!

  7. Dark Reality

    Awesome. If I switch to Linux, I’ll know there’s something like CCleaner there.

    Anyone use a CCleaner alternative that is free and open source? I don’t think Piriform is all that trustworthy, since they pulled CCleaner from Ninite and have refused to allow PortableApps to distribute their software. Not being able to update it automatically, it just feels sleazy. Surely there has to be a more trustworthy option.

  8. Xz!llA

    Thanks for the Article! From mere megabytes of free space I suddenly got GIGS! I’m now a fan and a believer and have spread the word to our club of Linux users on Facebook.=)))

  9. syncdram

    I’ve been using bleachbit before it was ever noticed and you will still have permission denied as root user.

  10. Jikininki

    @Dark Reality

    How about… Bleachbit?

    There is also a Windows version so if you don’t like CCleaner, then give Bleachbit a spin xP

  11. ActionSlacks

    @Anonymous June 19 12:08 pm

    Just install Gnome/KDE on Ubuntu then. Problem solved.

Get Free Articles in Your Inbox!

Join 134,000 newsletter readers

Email:

Go check your email!