Arch Software
Use for pacman, packages, AUR, PKGBUILD, makepkg, app install/build issues.
Pacman Query Map
pacman -Ss term # sync DB search
pacman -Si package # sync pkg info
pacman -Qs term # installed search
pacman -Qi package # installed pkg info
pacman -Ql package # installed files
pacman -Qo /path/file # file owner
pacman -Qm # foreign/local/AUR
pacman -Qtdq # orphan deps
pacman -F path # remote file owner; needs files DB
Refresh files DB only when needed:
pacman -Fy.
Install/Remove
- Install from repos:
pacman -S packageif DB current; otherwise full upgrade flow. - Full upgrade:
pacman -Syu. - Install local pkg:
pacman -U ./pkg.pkg.tar.zst. - Remove package + unneeded deps:
pacman -Rs package. - Avoid
-Rsc,-Rdd,--nodeps,--overwriteunless explicitly justified. - Use
--print/--print-formatfor dry/processable transaction previews.
AUR
AUR is unsupported/untrusted user content. Agent must inspect before build/install:
less PKGBUILD
ls -la
git diff @~..@ # if updating existing clone
Check for:
- unexpected network/code exec in build funcs
- dangerous
installscripts - checksum/PGP handling
- bundled patches
- dependency sanity
Build rules:
base-develis assumed by AUR packages.- Run
makepkgas normal user, never root. makepkg -scan install repo deps via pacman; AUR deps need separate handling.makepkg --verifysourcechecks sources without building.makepkg --printsrcinfofor metadata.- Clean chroot helps distinguish user-env failure from broken PKGBUILD.
AUR helpers do not remove review duty.
PKGBUILD Facts
Current truth:
man PKGBUILD, man makepkg.
Durable basics:
- PKGBUILD is Bash sourced by
makepkg; treat as executable code. - Minimal fields include
pkgname,pkgver,pkgrel,arch. package()installs into$pkgdir;prepare(),build(),check()optional.backup=()controls pacnew/pacsave behavior for config files.source=()+ checksums/PGP define source verification.- Split packages use multiple
pkgnames andpackage_name()funcs.
Current Sources
- Man:
pacman(8),makepkg(8),PKGBUILD(5),makepkg.conf(5) - Wiki:
Pacman,Arch User Repository,Creating packages,Makepkg - Live:
archlinux.org/packages,aur.archlinux.org