Skip to content

Pacman

  • List packages installed by pacman natively: pacman -Qe
  • List packages installed via wrapper: pacman -Qm

Search for packages:

Search for package providing a filename:

pacman -F eslint

List files in a package: pacman -Ql kanshi

List of installed packages (without AUR):

pacman -Qqen > /etc/pkglist.txt

List of non-native packages (i.e. from AUR):

pacman -Qqem > /etc/pkglist-aur.txt

Install

pacman -R python-jsmin

Uninstall

pacman -R python-jsmin

Downgrade

Downgrade packages

From local cache, if available

pacman -U file:///var/cache/pacman/pkg/curl-8.0.1-1-x86_64.pkg.tar.zst  file:///var/cache/pacman/pkg/lib32-curl-8.0.1-1-x86_64.pkg.tar.zst

Using the downgrade script

Automation Install downgrade script:

pamac install downgrade

Downgrade packages:

export DOWNGRADE_FROM_ALA=1
sudo -E downgrade icu=72.1-2

Setup mirrorlist

Search for the 5 fastest mirrors and update /etc/pacman.d/mirrorlist accordingly:

sudo pacman-mirrors -f 5

Restrict to german mitrrors:

sudo pacman-mirrors -g -c Germany

Upgrade

  • Upgrade packages: pacman -Syu

Dependency management

  • Show unneeded dependencies: pacman -Qdtq
  • Remove unneeded dependencies: pacman -Rs $ (pacman -Qdtq)

pacman + Proxy

Arch signing keys

Refresh all keys (takes a while):

pacman-key --refresh-keys

Arch Linux Archive (ALA)

Package groups

Trobleshooting

Warning: local is newer than community

How To Fix “Warning: local is newer than community” Error In Arch Linux

Warning: seatd: local (0.7.0-3) is newer than community (0.7.0-2)

Solution: sudo pacman -Suu will downgrade packages that are too new

Invalid gpg key

Manjaro wiki: Pacman trobleshooting#Errors about Keys Arch wiki: Invalid signature errors multilib.db: manjaro-sway: signature from "Jonas Strassel info@jonas-strassel.de" is invalid

Solution A: Fetch and lsign failing gpg key:

sudo pacman-key --recv-keys A44C644D792767CED7941AFEABB2075D5F310CF8
sudo pacman-key --lsign-key A44C644D792767CED7941AFEABB2075D5F310CF8

Manual solution C:

sudo rm -rf /var/lib/pacman/sync/* /var/cache/pacman/pkg/* /etc/pacman.d/gnupg
sudo pacman-key --init
sudo pacman-key --populate
sudo pacman-key --refresh-keys
sudo pacman -Sc
sudo pacman -Syy
sudo pacman -Sy manjaro-keyring archlinux-keyring

Build package with PKGBUILD

i.e.

cd ~/projects/timetracking/activitywatch/aw-watcher-window-wayland-git
makepkg
makepkg --install

AUR helpers