On 2022-04-20, Florian Obser <flor...@narrans.de> wrote:
> You will need a carefully curated /etc/sysclean.ignore file.
>
> You decided to put maildirs somewhere on the system, sysclean is not 
> omniscient, you need to tell it to leave them alone. Same with .git 
> directories.
> I don't recall needing to tell it about package config files though, that's a 
> bit weird.

e.g. files which are added to /etc that aren't distributed in the package but
you create yourself

> It's a bit daunting on first run if a lot of cruft has accumulated over the 
> years, but it gets better. I'm using it for years, and I can't recall the 
> last time I had to add anything to the ignore file.
>
> I run it from daily and also by hand after every upgrade to a snapshot.
>
> If it outputs a really long list I cleanup incrementally, for example:
> sysclean | fgrep /usr

For a first run I would review "| fgrep /usr/local" as that's the most likely
place where files might exist that should not be cleaned, and it's easier to
check for those if you don't have to wade through maybe thousands of lines of
old headers, fonts, manpages, obsolete perl components and timezone files.
If that is clear then I'm usually pretty happy to just remove anything else
under /usr.

If you want to be on the safe side then tar up the files before rm'ing.
I don't do that though.

> There really shouldn't be a false positive there, so after review I run
> sysclean | fgrep /usr | xargs rm -r
> next up is /etc.
> If there is more output afterwards something is either very weird or an 
> intentional decision by me to store something in that location so it goes 
> into the ignore file.


Reply via email to