5 ms·
Introduction to sysclean(8)
- commandersaki 3y agocperciva 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.
- cperciva 3y agoNo, FreeBSD Update only does the base system. For packages I believe the relevant command is `pkg check -sa`.
- SoftTalker 3y agoDo 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.
- j_not_j 3y agoTrue 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.
- jmmv 3y agoThere is also the postinstall version of this same idea for NetBSD too: https://man.netbsd.org/postinstall.8 https://man.netbsd.org/postinstall.8
- nxobject 3y agoI 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?
- cp9 3y agonix comes with a tool called nix-collect-garbage which takes care of this for you
- yepguy 3y agoPersonally, 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/ https://grahamc.com/blog/erase-your-darlings/
- PrimeMcFly 3y agoSo you have to reinstall all your software every time you reboot?
- m45t3r 3y agoNo, 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.
- rgoulter 3y agoNix 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.
- PrimeMcFly 3y agoThanks for clarifying!
- queuebert 3y agoWould 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.
- doublepg23 3y agoAuto-revoking permissions has been a feature of Android since Android 11 in 2020 https://www.androidpolice.com/2020/09/28/android-11-can-automatically-revoke-permissions-from-unused-apps/ https://www.androidpolice.com/2020/09/28/android-11-can-auto...
- sambazi 3y agoand serves as a major source of confusion and support tickets
- taskforcegemini 3y ago..the hidden benefits of being stuck with outdated firmware
- hulitu 3y agoAnd 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.
- magicalhippo 3y agoIt'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.
- 3y ago
- somat 3y agoRelated: 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 http://man.openbsd.org/mtree
- hulitu 3y agoThanks for the tip. I needed something like this from a long time.
- themulticaster 3y agoBased 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?
- jbverschoor 3y agoWouldn’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.
- tiffanyh 3y agoNanoBSD 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/ https://docs.freebsd.org/en/articles/nanobsd/
- guerrilla 3y agoDoes Arch Linux have something like this?