Maclean is a straight-forward script that includes many possible actions to reclaim disk space; particularly from caches, logs, and user $HOME.
Defaults to step-by-step prompting - only accept actions you are comfortable with.
Optionally include your own set of paths, clean only desired grouping (‘containers’, ‘developer’, ‘basic’, etc), or automatically start and affirm all cleanings.
And is now also available as maclean-git in the AUR;
What does it clean exactly?
Click here for an index of all cleaning operations
Operation
Clean
Remove
Paths
Notes
User-defined Junk
~/.adobe , ~/.macromedia
Default targets listed. Edit or add to the array in the script.
Thumbnail cache
~/.cache/thumbnails
Keep anything accessed within last 2 weeks.
$HOME cache
~/.cache
Keep select directories*. Keep anything accessed within last 2 weeks.
A config file would be neat to configure it once and afterwards just run maclean
I would be interested which of the mentioned parameters in the README relate to which table entry. That’s not exactly clear to me
There actually is a config file that should have been created on first run at ~/.config/maclean/maclean.conf, but currently its only job is to set the ‘Junk’ directories.
I do have vague plans to expand it in the future.
Ah, fair point. It can somewhat be inferred but I may create an extra column for the table .. possibly inserting some sort of similar index into the script’s help or maybe an extra flag for it.
I rather find things the other way around - I would like something, especially a utility with a handful of particular functions, to be CLI first. Its always quite annoying if you can perform some function only using the GUI - how will you do that from the TTY, or use that tool programmatically (such as part of an alias, fired automatically at login, or employed in your own script, etc)?
Maybe one day there will at least be something like yad dialogs. Maybe GMaclean like GUFW for UFW .. or maybe just an embedded option like maclean -g or something like that. One day.
Holy shit I just cleaned out 34.63 GiB of data. What the hell. 18.35 GiB in the pacman cache, 7.59 GiB in the AUR helper cache, 2.74 GiB in the rust cargo cache, and 5.76 GiB in $HOME cache for files not accessed for 2 weeks.
Wow, it removed nearly 11GB of junk, 9 of them being “cache of uninstalled packages and unused repositories”:
maclean log
Clean $HOME cache of files not accessed for 2 weeks (y/N)? y
Done
Recovered 1.59GiB
Clean thumbnail cache of files not accessed for 2 weeks (y/N)? y
Done
Recovered 8MiB
Clean journal of any logs older than 2 weeks (y/N)? y
Done
Recovered 0B
Clean up ALL Flatpak application data (y/N)? n
Skipped
Clean AUR Helper cache of ALL diff and package build files (y/N)? y
Done
Recovered 232MiB
Clean cache of uninstalled packages and unused repositories (y/N)? y
[sudo] password for root:
Done
Recovered 9.05GiB
Clean out pacman sandbox and interrupted download directories (y/N)? y
The following will be deleted:
/var/cache/pacman/pkg/download-l1VSkl
Continue with removal (y/N)? y
Done
Recovered 0B
Attention! Manual intervention required for the following files:
/etc/opensnitchd/system-fw.json.pacnew
Total Recovered: 10.88GiB
I hope it did not do any harm The only thing I was really unsure about was the “Clean up ALL Flatpak application data (y/N)?”, because it sounds like it will delete all flatkpaks (which I’m sure it woudln’t do). Maybe the question could tell you a little more what this step will actually do.
Hm. Not really. But good suggestion. Now I guess I have to generate a bunch of docker data.
Heh. There actually may be something to that. Though I dont think it was what that poster was referring to.
I think under the strictest of terms some of my joke licenses are not considered legitimately open enough. I forget which exactly .. but I recall one, and maybe it was beerware but maybe it was cat-supremacy .. that did cause some (not my) package to be removed from the debian or fedora repos until it applied a different license. I might consider replacing any of the joke ones with a proper license if something becomes popular enough for it to matter.