From ba7d38240198ba854384328843da52a26209f488 Mon Sep 17 00:00:00 2001 From: johannst Date: Sun, 28 Nov 2021 22:26:50 +0000 Subject: deploy: 6660154d7eaae83f3e8765af8b93dcd651e05452 --- tools/pacman.html | 262 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 262 insertions(+) create mode 100644 tools/pacman.html (limited to 'tools/pacman.html') diff --git a/tools/pacman.html b/tools/pacman.html new file mode 100644 index 0000000..b65cbb0 --- /dev/null +++ b/tools/pacman.html @@ -0,0 +1,262 @@ + + + + + + pacman - Notes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

pacman(1)

+

Remote package repositories

+
pacman -Sy              refresh package database
+pacman -S <pkg>         install pkg
+pacman -Ss <regex>      search remote package database
+pacman -Si <pkg>        get info for pkg
+pacman -Su              upgrade installed packages
+pacman -Sc              clean local package cache
+
+

Remove packages

+
pacman -Rsn <pkg>               uninstall package and unneeded deps + config files
+
+

Local package database

+

Local package database of installed packages.

+
pacman -Q               list all installed packages
+pacman -Qs <regex>      search local package database
+pacman -Ql <pkg>        list files installed by pkg
+pacman -Qo <file>       query package that owns file
+pacman -Qe              only list explicitly installed packages
+
+

Local file database

+

Local file database which allows to search packages owning certain files. +Also searches non installed packages, but database must be synced.

+
pacman -Fy              refresh file database
+pacman -Fl <pkg>        list files in pkg (must not be installed)
+pacman -Fx <regex>      search 
+
+

Hacks

+

Uninstall all orphaned packages (including config files) that were installed as +dependencies.

+
pacman -Rsn $(pacman -Qqtq)
+
+

List explicitly installed packages that are not required as dependency by any +package and sort by size.

+
pacman -Qetq | xargs pacman -Qi |
+    awk '/Name/ { name=$3 }
+         /Installed Size/ { printf "%8.2f%s %s\n", $4, $5, name }' |
+    sort -h
+
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3