2015-10-22 15:00:05 +08:00
|
|
|
# dpkg
|
2014-04-29 01:19:22 +04:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
> Debian package manager.
|
2024-10-04 21:14:41 +02:00
|
|
|
> Some subcommands such as `deb` have their own usage documentation.
|
2022-12-05 08:57:55 +08:00
|
|
|
> For equivalent commands in other package managers, see <https://wiki.archlinux.org/title/Pacman/Rosetta>.
|
2024-09-18 11:00:49 +02:00
|
|
|
> More information: <https://manned.org/dpkg>.
|
2014-04-29 01:19:22 +04:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Install a package:
|
2014-04-29 01:19:22 +04:00
|
|
|
|
2025-04-20 00:21:53 +03:00
|
|
|
`dpkg {{[-i|--install]}} {{path/to/file.deb}}`
|
2014-04-29 01:19:22 +04:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- Remove a package:
|
2014-04-29 01:19:22 +04:00
|
|
|
|
2025-04-20 00:21:53 +03:00
|
|
|
`dpkg {{[-r|--remove]}} {{package}}`
|
2014-04-29 01:19:22 +04:00
|
|
|
|
2016-01-07 18:31:27 +01:00
|
|
|
- List installed packages:
|
2014-04-29 01:19:22 +04:00
|
|
|
|
2025-04-20 00:21:53 +03:00
|
|
|
`dpkg {{[-l|--list]}} {{pattern}}`
|
2014-04-29 01:19:22 +04:00
|
|
|
|
2020-10-13 14:19:56 +03:30
|
|
|
- List a package's contents:
|
2014-04-29 01:19:22 +04:00
|
|
|
|
2025-04-20 00:21:53 +03:00
|
|
|
`dpkg {{[-L|--listfiles]}} {{package}}`
|
2016-11-25 12:08:18 -05:00
|
|
|
|
2018-09-03 11:28:06 +01:00
|
|
|
- List contents of a local package file:
|
|
|
|
|
2025-04-20 00:21:53 +03:00
|
|
|
`dpkg {{[-c|--contents]}} {{path/to/file.deb}}`
|
2018-09-03 11:28:06 +01:00
|
|
|
|
2017-01-02 23:06:30 +05:30
|
|
|
- Find out which package owns a file:
|
2016-11-25 12:08:18 -05:00
|
|
|
|
2025-04-20 00:21:53 +03:00
|
|
|
`dpkg {{[-S|--search]}} {{path/to/file}}`
|
2024-10-14 15:18:23 +04:00
|
|
|
|
|
|
|
- Purge an installed or already removed package, including configuration:
|
|
|
|
|
2025-04-20 00:21:53 +03:00
|
|
|
`dpkg {{[-P|--purge]}} {{package}}`
|