Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Introduction to sysclean(8) (kapouay.eu.org)
103 points by todsacerdoti on Sept 26, 2023 | hide | past | favorite | 32 comments


Do not simply pipe the output of sysclean to xargs rm -f or you will most likely regret it.

It's a list of things to look at, not a list of things you definitely don't need.


True this.

I tried it once a long time ago; it failed to find the sqlite3 command (back when SQLite was part of base). I spent way too much time debugging a sqlite-based script until I noticed /usr/bin/sqlite3 was still on my system.

"sysclean is a perl(1) script designed to help remove obsolete files, users and groups, between OpenBSD upgrades."

Or you could read the release notes.


Related: mtree can be an amazing tool. very handy to help you maintain audits of your system.

I think there is a linux tool that does the same thing but I can't remember what it is. I just used mtree on my linux hosts and it worked fine.

http://man.openbsd.org/mtree


Based on its name I think it's used in Arch Linux packages (at least makepkg says it is generating an mtree file at some point during the build process IIRC). However it appears mtree (the tool) isn't packages, so perhaps it's only using the mtree specification format?


Thanks for the tip. I needed something like this from a long time.


Would be nice to have something like Android has nowadays where software that hasn't been used in X days is progressively permission restricted and tallied in a list for easy removal.


Yeah... no.

This kind of automatic intelligence based on very simple statistical methods is at best annoying and at most harmful.

If I had to run such a system and had access to this functionality, my first response would be to disable and remove it.


Yes, like the app to warn me in case of a disaster which gets the location permission removed and thus cannot warn me anymore.


Auto-revoking permissions has been a feature of Android since Android 11 in 2020 https://www.androidpolice.com/2020/09/28/android-11-can-auto...


..the hidden benefits of being stuck with outdated firmware


and serves as a major source of confusion and support tickets


And when you need to use it, it's gone.

I have some bus schedule apps that i use when i travel to other cities so Android removing them will be an inconvenience.


It's not a huge inconvenience in my experience, as the apps should be written to ask for permission if they don't have it. Thus it should be a single additional click in that case.

I much prefer that over apps having permissions "forever".

Only thing I dislike is that the Android permissions are quite coarse grained and intertwined. I still get asked for some seemingly irrelevant permission but when I check then it turns out it's just Androids permissions being weird.


thus one is getting used to granting random access permissions


I thought this was a Samsung feature.

On Samsung it doesn't uninstall it, it just removes permissions and then finally disables it.

What OS are you using that it uninstalls things?


I don't know about the immediate parent, but on my Pixel it doesn't uninstall anything automatically. It suggests apps to uninstall if you go to Files > Clean, but doesn't nag you about it.


I sometimes get a strange feeling that apps should have been more like web pages. Nothing to install, it's there when you want to use it and gets evicted from the cache if you don't.

I think the converse of this is. What would the web would have looked like if a commercial corporation developed it? An app store, it would be an app store.


Android Instant Apps, however almost no one uses them, because not everyone has 5G all over the place.


> What would the web would have looked like if a commercial corporation developed it?

Do you really not know already given the many precedents of this kind of thing/


I wonder... do people with distros that use declarative package management have use for a similar tool? How do you "spring clean" your installs... apart from reinstalling?


Personally, my NixOS system is wiped every time it boots up [1]. So no, I have no need for a tool like sysclean.

[1]: https://grahamc.com/blog/erase-your-darlings/


So you have to reinstall all your software every time you reboot?


Nix works by putting its packages into some installed folder, and then building a system by symlinking to those packages.

You'd retain the nix package storage between boots (so as to avoid having to redownload/rebuild), and setting the system up just involves setting up some symlinks. - GrahamC's blogpost discusses this in a bit more detail.

"Fresh system each run" isn't too exotic compared to image-based approaches like launching a VM on AWS, or running a Docker image.


Thanks for clarifying!


No, since all your system is declarative all the software and related configuration is redone at each reboot. Just the state is removed.

To avoid losing data you want to keep you can also mark directories or files to be stored in the permanent storage.

Take a look at the nixos-impermanence that automates this task to you.


nix comes with a tool called nix-collect-garbage which takes care of this for you


cperciva wrote a similar tool for FreeBSD called "freebsd-update IDS", though I cannot remember if it detects files that are not part of the base system.


No, FreeBSD Update only does the base system. For packages I believe the relevant command is `pkg check -sa`.


There is also the postinstall version of this same idea for NetBSD too: https://man.netbsd.org/postinstall.8


Wouldn’t a read only system image be enough?

Zapping caches shouldn’t be a problem. Log files should be kept. Local configuration shouldn’t be mixed with system/default config.

Imo, this is attacking the problem from the wrong angle.


NanoBSD

NanoBSD does this. It's a version of FreeBSD with an immutable (read-only) base.

I've always been surprised OpenBSD hasn't created similar capabilities, given that the use case for an immutable base is great for routers / firewalls - and OpenBSD is commonly used for that.

https://docs.freebsd.org/en/articles/nanobsd/


Does Arch Linux have something like this?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: