I was wondering what the consensus is on programs that clean residual files off your hard drive. . . . which one is considered best, and the most adequate and what does everyone use most?
I.e. I’ve got Octopi cache cleaner, sweeper, bleachbit and stacer on board my system. They all seem to show to various levels of what they clean up as far as files. What’s the general consensus here on this?
My personal consensus is that such tools are basically a waste of time and have a greater chance of breaking something than actually making the system better in some way.
All these years I have used bleacbit without problems in many different distros. To me much more dangerous procedure has been removing orphans. Some time ago when I wasn’t paying enough attention what packages this command: pacman -Qtdq | pacman -Rns - was actually doing I lost vlc…
Of course I could reinstall it later, but it was a good reminder you should always be careful when using such commands.
I use this to clean my system :
pacman -Sc or -Scc, same for yay
trash-empty
sudo du -sh ~/.cache/
rm -rf ~/.cache/*
rm -rf ~/{.bundle,.cargo,.cmake,.dotnet,.electron,.electron-gyp,.gem,.gradle,.lazarus,.node-gyp,.npm,.nuget,.nvm,.racket,.rustup,.stack,.yarn} || true
sudo rm -rf ~/go || true
rm -rf ~/.cache/{electron,electron-builder,go-build,node-gyp,pip,yarn} || true
There is no need for sudo here. It’s always a good idea to be extremely cautious when using sudo and minimise its usage whenever possible. The whole point of sudo is to limit the use of the root account to only the tasks that require root privileges to be completed.
So if something works without sudo, it’s bad practice to use sudo, because it goes against its purpose.
I second this. Every once in a long while I fire up baobab and check to see if there’s something under the rug somewhere. I check for folders taking up unusually large space and then go ahead and manually remove the files that I no longer need. In fact you can delete a directory directly from Baobab itself, which makes it even more convenient to use.
As for the other tools they’re just graphical interfaces for a file search that you could do with du or find. So, depending what they’re programmed to look for they’ll show different things. The key is reading what they’ve found and deciding whether you need those files or not. Then, use the one that finds more files you want to delete. But you might be better off just writing your own script to find and rm what you want, like badplugin did above. Just know what’s being deleted or you’re better off leaving it on your drive.
I like Filelight because of its pretty visualisation and exploratory workflow, but the good old du is also very useful, because it’s just so quick and easy to use.
Thanks, I didn’t know that so far and I looked at it and it’s an encouraging initiative for a first blick. So far I have used and continue to use Bleachbit. When I installed something from the AUR and the compilation process was interrupted for some reason, Bleachbit often came in handy to remove the debris