Not sudo nano. Sudoedit doesn’t actually run the editor as root and is better from a security perspective.
Any time you wish to edit a root required file it should be done in this way so as to not run things as root you don’t need to.
Sudoedit creates a temporary copy of the file allowing non root to edit it (it creates specific locked down permission for doing so) then when finished root will write the file if changed.
Came hear as part of searching for suggestions on how to clear my AUR cache but learning some useful stuff along the way in this thread. I’m also discovering that “paru -Scc” is not really working (had to delete that cache manually - researching elsewhere seems to indicate that’s a known issue). Looks like my journal default settings are just fine. Gone ahead and set up the paccache timer for now but very intrigued at the idea of creating a pacman hook that can clean both pacman and aur caches automatically.
It would probably be easier to setup a systemd unit to clean the paru and yay caches. pacman hooks run as root so you would have to work around that otherwise.
As a side note, you should probably try to use either paru or yay, not both. By switching back and forth, you won’t get proper diffs.
Ok so, I’ll just run with “yay” for now. It appears that, if I wanted to include my “yay” cache in the paccache.timer periodic cleanup, I can go into /usr/lib/systemd/system/paccache.service and add the following line in bold text
there is no yay cache in /root folder at all if you use yay properly…
i would add user services in users home path and use --user option to run them in user level…
under: mkdir -p ~/.config/systemd/user/ and starting it like so: systemctl --user daemon-reload systemctl --user enable yaycache.service
…actually, this doesn’t look like it will be too tricky. Looks like I want to create the .service file and a .timer file for it as well. Since there aren’t nearly as many AURs installed, perhaps monthly will be sufficient.