blob: 2a6ce95533bfd7330aae0d9f1cb3273a5b609924 (
plain) (
blame)
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
|
# pacman(1)
## Remote package repositories
```text
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
```text
pacman -Rsn <pkg> uninstall package and unneeded deps + config files
```
## Local package database
Local package database of installed packages.
```text
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.
```text
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.
```text
pacman -Rsn $(pacman -Qtdq)
```
List explicitly installed packages that are not required as dependency by any
package and sort by size.
```text
pacman -Qetq | xargs pacman -Qi |
awk '/Name/ { name=$3 }
/Installed Size/ { printf "%8.2f%s %s\n", $4, $5, name }' |
sort -h
```
Install package into different `root` directory but keep using the default
database.
```text
pacman --root abc --dbpath /var/lib/pacman -S mingw-w64-gcc
```
|