Pacman
List / Search
- 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
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)
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
Pacman wrappers
cli
pamac
- Manjaro Wiki
- config dir:
~/.config/pamac
- tmp dir:
/var/tmp/pamac
- DBs:
/var/tmp/pamac/dbs/sync
- Temp package files:
/var/tmp/pamac/aur-varac
Usage:
List available updates:
Pamac issues
Can't install for aur packages on corporate proxy
- Gitlab issue
- Solution: Use
yay
for installing AUR packages
unable to lock database, Failed to synchronize databases
- Pamac update: unable to lock database, Failed to synchronize databases
- Solution:
pamac update --force-refresh
invalid or corrupted database
Error: Failed to prepare transaction: invalid or corrupted database
pamac update --force-refresh
If this doesn't solve the issue, try this solution from a Manjaro fourum post:
sudo pacman-mirrors -g -c Germany
sudo rm /var/lib/pacman/sync/*
sudo pacman-key --init
sudo pacman-key --refresh-keys
sudo pacman-key --populate archlinux manjaro
sudo pacman -Syyu
yay
- Github
- Not packaged in Arch, but pre-packaged in Manjaro-sway
Behind proxy:
Use --sudoflags=-E
:
Update package lists:
yay -Syu --sudoflags=-E
Install package:
yay -S google-cloud-sdk --sudoflags=-E
Paru
- Github
- Not packaged in Arch
Install:
sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si
Files:
- Cache/clone dir:
~/.cache/paru/clone/
Usage
Interactive search and install:
paru inxi
Install package:
paru -S tofi
baph
- Github
- Not packaged in Arch
- Stale !
Full system upgrade:
baph -u
TUI
Parui
parui is a TUI frontend to paru