Difference between revisions of "Dpkg"
Jump to navigation
Jump to search
Line 24: | Line 24: | ||
** <code>dpkg -c /path/to/package_name.deb</code> | ** <code>dpkg -c /path/to/package_name.deb</code> | ||
− | + | {{dpkg changes}} | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
* <code>dpkg --configure -a</code><ref> https://www.ostechnix.com/how-to-fix-e-could-not-get-lock-var-lib-dpkg-lock-error-on-ubuntu/</ref> | * <code>dpkg --configure -a</code><ref> https://www.ostechnix.com/how-to-fix-e-could-not-get-lock-var-lib-dpkg-lock-error-on-ubuntu/</ref> |
Revision as of 09:36, 26 December 2019
dpkg
is a package management software used among others by Debian operating system. It can be used to install, remove, and provide information about .deb packages.
New package configurations will append a *.dpkg-old OR *.dpkg-dist.
Contents
Basic dpkg commands
- Install a .deb package:
dpkg -i filename.deb
- Remove an installed package:
dpkg -r package_name
- Get Information about a package
- List of installed packages in your computer can be obtained with:
dpkg -l [optional pattern]
- List files in a package:
dpkg -L package_name
dpkg-query -L package_name
- Find package owner of a file:
dpkg -S `which file_to_search`
(-S Search)
- List content of a package, content can be extracted suing
ar
command:dpkg -c /path/to/package_name.deb
- Get a list of recently installed packages
zcat -f /var/log/dpkg.log* | grep "\ install\ " | sort
- Get a list of recently upgraded packages
zcat -f /var/log/dpkg.log* | grep "\ upgrade\ " | sort
- Get a list of recently installed or upgraded packages
zcat -f /var/log/dpkg.log* | egrep "\ install\ |\ upgrade\ " | sort -nk1
dpkg --configure -a
[1]
Example Outputs of dpkg commands
Package: sysstat Status: install ok installed Priority: optional Section: admin Installed-Size: 1336 Maintainer: Robert Luberda <[email protected]> Architecture: amd64 Version: 11.4.3-2 Depends: lsb-base (>= 3.0-6), ucf (>= 2.003), xz-utils, debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.14), libsensors4 (>= 1:3.0.0) Recommends: cron | cron-daemon Suggests: isag Conffiles: /etc/cron.d/sysstat 455c3c071b6daabb4e4490828975034c /etc/cron.daily/sysstat 19b1317e195208eed1a0bcd68be2e637 /etc/init.d/sysstat 577050178b0105b10118acfe3335de3f /etc/sysstat/sysstat ca4bb64ec3044408fed750d0d3d7769a /etc/sysstat/sysstat.ioconf fa92b01baa2130e26822c30fb27ac56e Description: system performance tools for Linux The sysstat package contains the following system performance tools: - sar: collects and reports system activity information; - iostat: reports CPU utilization and disk I/O statistics; - tapestat: reports statistics for tapes connected to the system; - mpstat: reports global and per-processor statistics; - pidstat: reports statistics for Linux tasks (processes); - sadf: displays data collected by sar in various formats; - cifsiostat: reports I/O statistics for CIFS filesystems. . The statistics reported by sar deal with I/O transfer rates, paging activity, process-related activities, interrupts, network activity, memory and swap space utilization, CPU utilization, kernel activities and TTY statistics, among others. Both UP and SMP machines are fully supported. Homepage: http://pagesperso-orange.fr/sebastien.godard/
Activities
Basic
Advanced
- Read
uscan
https://manpages.debian.org/buster/devscripts/uscan.1.en.html and https://wiki.debian.org/debian/watch to understand how new packages are generated: https://manpages.debian.org/buster/devscripts/uscan.1.en.html - Learn about
dpkg -V
and dpkg -C options
See Also
APT
:wajig
,apt-cache
,add-apt-repository
PPA,apt
[install
|remove
|purge | show | list | changelog
|update
|upgrade
],do-release-upgrade
,apt-mark
,apt full-upgrade
,sources.list
, APT Automatic updates,unattended-upgrade
,apt-transport-https
,apt-get update
,/etc/apt/
,/etc/apt/apt.conf.d/50unattended-upgrades
,/etc/apt/apt.conf.d/
,/etc/apt/apt.conf.d/20auto-upgrades
,apt-file, apt-utils
- RPM, YUM, DNF,
rpm-ostree
,rpm -qi
,rpm -q, rpm -ql
,up2date
,rpm -qf
,/etc/rpm-ostreed.conf, rpm2cpio, rpmfind.net
, Mock dpkg, dpkg-query
,update-alternatives
[2],ar
,debsums
,dpkg -V
,dpkg -S
,dpkg -L
,dpkg --configure -a
,wajig
,dpkg -i -E
,dpkg --help, dpkg-source-gitarchive
- Snap:
snap
,snapd
,snapctl
,snapcraft
,snap
: [list
|install
|find
|info
|services
|start
|stop
|remove
|refresh | set
|logs
]snapd
|snap list | snap version
|snap find aws
|snap --help
] - Wikipedia:dpkg
- Wikipedia:APT (Debian)
- wikipedia:Deb_(file_format) to understand .deb internal format an included files: preinst, postinst, prerm and postrm.
- pkgutil (MacOS)
- brew (MacOS), command of the Homebrew package management software wikipedia:Homebrew (package management software)
- pkg (FreeBSD)
- wikipedia:apt-file to view the contents of debian packages on remote repositories
Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy.. Source: https://en.wikiversity.org/wiki/Linux_server_administration/dpkg
Advertising: