blob: 98a11d83f2fb14b1e50de98d0d050e740c668d0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# Arch Linux Packages
## Downgrade cached package
pacman -U /var/cache/pacman/pkg/package-version...
## Debloating
### Cleaning cache
paccache -r
* `-k`: how many past versions of each package to keep, defaults to 3.
* `-u`: target only uninstalled packages.
# remove all versions of uninstalled packages
paccache -ruk0
### Removing orphaned packages
pacman -Qtdq | pacman -Rns -
### List packages by size
LC_ALL=C pacman -Qi | awk '/^Name/{name=$3} /^Installed Size/{print $4$5, name}' | sort -h
## Troubleshooting failed installations
Usually enough to update keyring:
pacman -Sy archlinux-keyring
Might need to update mirrorlist first if outdated:
sudo pacman -Sy pacman-mirrorlist
(this might put it in /etc/pacman.d/mirrorlist.pacnew, uncomment wanted mirrors
there and remove the .pacnew suffix)
## Query (-Q)
By itself, outputs all installed packages.
### Info
Includes provided binaries/libraries, dependencies, installed size, etc.
pacman -Qi <package>
Double info, includes more information, including packages that require (depend
on) this one:
pacman -Sii <package>
### Browsing installed packages with `fzf`
pacman -Qq | fzf --preview 'pacman -Qil {}' --layout=reverse --bind 'enter:execute(pacman -Qil {} | less)'
## Files (-F)
Query the files database.
Download/update database:
pacman -Fy
Lists packages that contain `file`:
pacman -F <file>
List files contained in `package`:
pacman -Fl <package>
|