On Thu, Apr 21, 2022 at 08:24:31AM +0200, Florian Obser wrote: > On 2022-04-20 21:42 UTC, Stuart Henderson <stu.li...@spacehopper.org> wrote: > > 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 > > Ah, yes. But it does understand directories, e.g. I have a lot of > changes in /etc/icinga2 but I don't need to ignore it. I guess that's > why I only need to ignore very little in /etc.
sysclean is using PLIST information from packages for knowing what is expected to be present or not. so if you had to add a file/directory in /etc/sysclean.ignore whereas it should belong to a port, it usually means a @sample or @extra entry is missing in PLIST :-) > > > >> 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 /usr/local is globally ignored by sysclean. if you want to compare it with filesets from packages, the base system carries pkg_check (with pkg_check -qF). reviewing "| fgrep /usr" should be fine for a first run. > > tzk tzk, someone has been naughty and installed things without packages? > ;) > > I don't do that and I imagine if one installs compiled, dynamically > linked programs by hand sysclean's returns deminish really fast because > it won't understand that old libs are still needed. yes, it is a know drawback: if you compile locally a binary, sysclean will not know that you still need some libraries... I have few binaries in my $HOME for example, and I considere that sysclean helps to me rebuild them (because it breaks them when I remove old libc.so). Maybe one day I will create a (local) package for properly track them. -- Sebastien Marie