You are not logged in.
Hi
I'd like to modify paccache.timer so as to only keep one version on packages in the cache instead of 3. (default)
I tried :
$ sudo nano /usr/lib/systemd/system/paccache.service
------------------------------------------------
ExecStart=/usr/bin/paccache -rk1
but this gets reverted after a while to the default paccache -r command
Any idea how I can make this permanent ?
Last edited by Cvlc (2021-08-18 14:15:33)
Offline
https://wiki.archlinux.org/title/System … ided_units
Also (unrelated here) "man sudoedit"
Offline
Hi
Thanks very much, exactly what I was looking for !
for anyone looking for a quick answer to the same question :
$ sudo systemctl edit paccache.service
and add
[Service]
ExecStart=
ExecStart=/usr/bin/paccache -rk1
Have good day !
Offline
Hi
Digging up this old question of mine, I'm trying to modify the service again so that it also cleans the cache from uninstalled packages (# paccache -ruk0)
I can't get this to work, I've tried
[Service]
ExecStart=
ExecStart=/usr/bin/paccache -rk1 && /usr/bin/paccache -ruk0
which throws no error, but doesn't run the second command, and
[Service]
ExecStart=
ExecStart=/usr/bin/paccache -rk1
ExecStart=/usr/bin/paccache -ruk0
which throws an error..
do I need to make a script with those two commands first, and link to that ? seems like there should be a nicer way to do it
Thanks for your help and happy new year !
Offline
Systemd service files are not shell scripts nor interpreted by a shell, so && would not work. Instead:
COMMAND LINES
This section describes command line parsing and variable and specifier substitutions for ExecStart=, ExecStartPre=, ExecStartPost=, ExecReload=, ExecStop=, and ExecStopPost= options.Multiple command lines may be concatenated in a single directive by separating them with semicolons (these semicolons must be passed as separate words).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Slapped my own hand for not reading the docs... damn wiki being too good you end up forgetting there's more
Thanks !
$ sudo systemctl edit paccache
### Editing /etc/systemd/system/paccache.service.d/override.conf
### Anything between here and the comment below will become the new contents of the file
[Service]
ExecStart=
ExecStart=/usr/bin/paccache -rk1 ; /usr/bin/paccache -ruk0
### Lines below this comment will be discarded
### /usr/lib/systemd/system/paccache.service
# [Unit]
# Description=Remove unused cached package files
#
# [Service]
# Type=oneshot
# ExecStart=/usr/bin/paccache -r
Last edited by Cvlc (2022-01-03 00:30:46)
Offline