Order of execution

Forum tags: 

I've just started to use BleachBit in my Ubuntu 10.04 and noticed that it's cleaning is not as "secure" as it could be.

Currently the program goes through the items alphabetically (From Adobe Reader --> yum)

Which means that the system wipe happens before thumbnails, email and torrent applications are deleted.

Would it be more "secure" to reorder the items so that:
- First files are deleted,
- Then databases are cleaned,
- Then the resulting free-space and memory/swap is cleaned / wiped?

That would seem a more secure way of cleaning the system.


Yes, I understand and agree the free disk space, memory, and swap should be done last. Until BleachBit implements this natively, users can do it manually by running BleachBit twice. Yes, I know that's a hassle (unless you use the command line).

Please elaborate on the the first two (files and databases): how do you distinguish files from databases (give examples of each) and why files before databases?

Andrew, lead developer

I currently I've got a script to run BleachBit without the 'wipe' options selected and run a sequance of "dd" commands to wipe disk free space and the memory / swap partition. I can leave that to run overnight.

As for the files / database issue.
I was unsure if the program did anything to the databases apart from deleting databases and recreating them (or letting the Program recreate them) at next start.
If that's the case then it does not matter since they can be considered files.

But if the databases are accessed to remove entries, then it would be best to do those after files have been removed.
I'm no programmer (I just fix the things when users muck them up!!) but the programmers I worked with used that sequence of; delete files then clean entries from database when they were removing data.

I'm starting to dip my toe into programming (Starting with getting to grips with linux scripts) i'll probably have a look around the source and see how it works..

By databases do you mean sqlite databases? If the BleachBit logs says "delete" the file is simply deleted. If the log says "vacuum," then BleachBit uses SQLite itself (through the Python-SQLite API) to vacuum the database. I'm haven't had time yet to investigate how SQLite implements the vacuum operation in terms of file creation vs in-place file modified.

Andrew, lead developer

I do mean the SQLite databases.

By the looks of it, the vacuum just removes empty space and re-orders if required (rather than remove entries)
So it would not matter if it was before or after the file deleting.

thanks for your quick replies.

Feel free to file a bug about the order here https://bugs.launchpad.net/bleachbit/ so it doesn't get lost. I would be interested in making the swap, RAM, and disk the last operations.

Andrew, lead developer

As requested I've submitted a but report


The order of execution has changed in BleachBit 0.8.3 beta (please test). Order is
1. General cleaning
2. Deep scan
3. RAM/Swap
4. Free disk space

Also, there is a new entry in the file menu to wipe free disk space on any drive. Also, there is a new context menu (right click), so you can run the option without changing any check boxes.

Andrew, lead developer