Documentation Request: Add name of systemd timer that cleans cache

Documentation Request: Add name of systemd timer that cleans cache.

The web Page:
https://wiki.manjaro.org/index.php?title=Pacman_Overview#Cleaning_the_Cache

The current text:

Systems running Pamac will already have access to its automated pacman cache cleaning functions.

Suggested text 1:

Systems running Pamac will already have access to its automated pacman cache cleaning functions through the systemd timer pamac-cleancache.service. To display all timers, type systemctl list-timers.

A few sentences down the wiki says,

A safer way to remove old package cache files is to remove all packages except for the latest three package versions using paccache:

Why does the systemd timer run
pamac clean
rather than
paccache -remove --keep 3?

By safer, does it mean if there is an update problem with a specific package, a quick install to a previous version is readily available in the cache?

Good question.
You could always make an override config ofcourse.

> sudo systemctl edit pamac-cleancache.service

And put this inside the editor that gets opened:

[Service]
ExecStart=
ExecStart=/usr/bin/paccache --remove --keep 3

That will result in:

> systemctl cat pamac-cleancache.service
# /usr/lib/systemd/system/pamac-cleancache.service
[Unit]
Description=Clean packages cache

[Service]
Type=oneshot
ExecStart=/usr/bin/pamac clean --no-confirm

# /etc/systemd/system/pamac-cleancache.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/paccache --remove --keep 3
2 Likes

Or you could just change it from:

ExecStart=/usr/bin/pamac clean --no-confirm

to

Execstart=/usr/bin/pamac clean --keep 3 --no-confirm
1 Like

See, if there would have been a man page for pamac i could have put it that way also :smiley: :+1:
Ofcourse keep in mind that when using an override config you first need to assign an empty ExecStart to clear the entry in the distributions config, else you get two ExecStart commands applied…

Unfortunately not, however you can use:

pamac --help

It also works for each command; i.e.,

pamac clean --help

I was discussing this with a friend and they thought perhaps when the timer ran that pamac obeyed the option set in the GUI (paman > Preference > Cache), so there wouldn’t be a need to modify the systemd timer. I’m not sure if this is true or not, but it would be nice if it did and it was documented.

What’s nice about a man page is that all doc is in one place that is searchable.
I did do: pamac --help clean