You are not logged in.

#1 2020-12-25 02:00:37

kormpu
Member
Registered: 2020-08-18
Posts: 30

[SOLVED] Custom pacman hook

Is there a way to have pacman run a custom post-installation hook on package whenever it is updated?

Last edited by kormpu (2020-12-25 15:32:12)

Offline

#2 2020-12-25 02:29:05

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 535

Re: [SOLVED] Custom pacman hook

Offline

#3 2020-12-25 07:50:02

SteffNC
Member
Registered: 2019-05-22
Posts: 14

Re: [SOLVED] Custom pacman hook

I have a hook for starting paccache after upgrading and installing packages like this:

$ cat /etc/pacman.d/hooks/paccache.hook 
[Trigger]
Operation = Upgrade
Operation = Install
Type = Package
Target = *
[Action]
Description = Cleaning pacman cache
When = PostTransaction
Exec = /sbin/paccache -rk3

Offline

Board footer

Powered by FluxBB