2025-03-14 21:59:59 -06:00
|
|
|
# dpkg
|
|
|
|
|
|
|
|
|
|
> Debian package manager.
|
|
|
|
|
> Some subcommands such as `deb` have their own usage documentation.
|
|
|
|
|
> For equivalent commands in other package managers, see <https://wiki.archlinux.org/title/Pacman/Rosetta>.
|
|
|
|
|
> More information: <https://manned.org/dpkg>.
|
|
|
|
|
|
|
|
|
|
- Install a package:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`dpkg {{[-i|--install]}} {{path/to/file.deb}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Remove a package:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`dpkg {{[-r|--remove]}} {{package}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- List installed packages:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`dpkg {{[-l|--list]}} {{pattern}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- List a package's contents:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`dpkg {{[-L|--listfiles]}} {{package}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- List contents of a local package file:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`dpkg {{[-c|--contents]}} {{path/to/file.deb}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Find out which package owns a file:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`dpkg {{[-S|--search]}} {{path/to/file}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Purge an installed or already removed package, including configuration:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`dpkg {{[-P|--purge]}} {{package}}`
|