Skip to content

u/rafasc

In this archive from Feb 2013 to Apr 2020

0
posts
46
comments
0
media
353
score

Top comments

pacman hooks. This will leave the last 3 installed and the last uninstalled.

[Trigger]
Operation = Install
Operation = Upgrade
Operation = Remove
Type = Package
Target = *

[Action]
Description = Removing old cached pacakges ...
When = PostTransaction
Exec = /usr/bin/env bash -c "/usr/bin/paccache -vrk3; /usr/bin/paccache -vruk1;"

edit1: hooks should be placed at /etc/pacman.d/hooks/ and must have .hook as extension.
edit2: you can also use paccache to remove cached aur packages if you specify the directory with -c. It's slightly harder since different helpers use different folders. --dry-run is useful here while you try to figure things out.

41 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.