/ de-omarchy / bin / omarchy-update-pkg-prune
swadhinbiswas Initial de-omarchy: Omarchy UI layer for Arch-based distros · 8/22/2026
9f393b2
14 lines · 463 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

# omarchy:summary=Prune superseded versions from the pacman package cache
# omarchy:requires-sudo=true

set -e

# The cache is the only offline downgrade path, so keep two. Run before the
# packages update and the installed version survives with a spare. paccache
# retains by version order, never by what is installed.
echo -e "\e[32m\nPrune package cache\e[0m"
sudo paccache -rk2 || echo -e "\e[33mCould not prune the package cache.\e[0m" >&2
echo