3

I'm trying to figure out how to run the "wipe free disk space" via the command line on Ubuntu 16.04 with Bleach Bit. It looks like the bleachbit command utility can only wipe specific caches. Does anyone have any ideas on how to do this?

The option I'm referring to in the Bleach Bit GUI

Thomas
  • 6,223
jim
  • 33

2 Answers2

2

Bleachbit console application has several options:

$ bleachbit --help
Options
...
-l, --list-cleaners   list cleaners
-c, --clean           run cleaners to delete files and make other permanent
                      changes
...
-p, --preview         preview files to be deleted and other changes

so if I call it with

$ bleachbit -l | grep free

I can get

system.free_disk_space

It seems that you should call it with

bleachbit -c -p system.free_disk_space # remove -p if you want real action

Note: if we look into BleachBit's source code - we can see how it calls the above action in cb_wipe_free_space for Wipe Free Space label.

N0rbert
  • 99,918
2

The answer from @N0rbert is the best for BleachBit version 2.0 and earlier. Please note it uses the directories configured in the GUI or in bleachbit.ini, and the directories cannot be changed on the command line.

I liked Thomas's idea, so today I committed a change for future verions that works like this.

bleachbit --wipe-free-space /dev/shm /tmp /home/username

Update: BleachBit version 2.1 is published, and it has the new command line option

Andrew
  • 1,535