Editing Dpkg

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{lowercase}}
+
<code>[[Wikipedia:dpkg|dpkg]]</code> 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.
<code>[[Wikipedia:dpkg|dpkg]]</code> ([[1994]]) is a [[package management]] software used among others by Debian operating system. It can be used to install, remove, and provide information about <code>[[.deb]]</code> packages.
 
* <code>[[dpkg --help]]</code>
 
 
 
  
 
New package configurations will append a *.dpkg-old OR *.dpkg-dist.
 
New package configurations will append a *.dpkg-old OR *.dpkg-dist.
Line 9: Line 6:
 
* Install a .deb package:
 
* Install a .deb package:
 
** <code>dpkg -i ''filename.deb''</code>
 
** <code>dpkg -i ''filename.deb''</code>
** <code>dpkg -i -E ''filename.deb''</code> ( <code>-E, [[--skip-same-version]]</code>) 
 
 
 
* Remove an installed package:
 
* Remove an installed package:
 
** <code>dpkg -r ''package_name''</code>
 
** <code>dpkg -r ''package_name''</code>
  
 
* Get Information about a package
 
* Get Information about a package
** <code>[[dpkg -s]] ''package_name''</code> (<code>-s --status</code>). See also: <code>[[apt-cache]] policy package_name</code>
+
** <code>dpkg -s ''package_name''</code> (-s status). See also: <code>[[apt-cache]] policy package_name</code>
  
* [[List installed packages]] in your computer can be obtained with:
+
* List of installed packages in your computer can be obtained with:
** <code> [[dpkg -l]] ''[optional pattern]''</code>
+
** <code> dpkg -l ''[optional pattern]''</code>
 
* List files in a package:
 
* List files in a package:
** <code>[[dpkg -L]] ''package_name''</code>
+
** <code>dpkg -L ''package_name''</code>
 
** <code>[[dpkg-query]] -L ''package_name''</code>
 
** <code>[[dpkg-query]] -L ''package_name''</code>
  
Line 29: Line 24:
 
** <code>dpkg -c /path/to/package_name.deb</code>
 
** <code>dpkg -c /path/to/package_name.deb</code>
  
{{dpkg changes}}
+
* Get a list of recently installed packages
 +
** <code>zcat -f /var/log/dpkg.log* | grep "\ install\ " | sort</code>
 +
 
 +
* Get a list of recently upgraded packages
 +
** <code>zcat -f /var/log/dpkg.log* | grep "\ upgrade\ " | sort</code>
  
* <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>
+
* Get a list of recently installed or upgraded packages
 +
**<code>zcat -f /var/log/dpkg.log* | egrep "\ install\ |\ upgrade\ " | sort -nk1</code>
  
* <code>[[dpkg-reconfigure]]</code>, <code>[[dpkg-reconfigure openssh-server]]</code>
+
* <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>
  
 
=== Example Outputs of dpkg commands ===
 
=== Example Outputs of dpkg commands ===
* <code>[[dpkg --status]] [[sysstat]]</code> or <code>dpkg -s [[sysstat]]</code>
+
* <code>dpkg --status [[sysstat]]</code> or <code>dpkg -s [[sysstat]]</code>
 +
<pre>
 +
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/
 +
</pre>
  
 
== Activities ==
 
== Activities ==
 
===Basic===
 
===Basic===
# Read <code>[[apt]]</code> and <code>[[snap]]</code> page
+
# Read [[apt]] and <code>[[snap]]</code> page
 
# Install a package using [[dkpg]]
 
# Install a package using [[dkpg]]
 
# Understand differences between apt and dpkg
 
# Understand differences between apt and dpkg
Line 46: Line 81:
 
=== Advanced ===
 
=== Advanced ===
 
# Read <code>uscan</code>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
 
# Read <code>uscan</code>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 <code>[[dpkg -V]]</code> and [[dpkg -C]]</code> options
 
  
 
== See Also ==
 
== See Also ==
 
* {{apt}}
 
* {{apt}}
* {{package managers}}
+
* {{rpm}}
 
* {{dpkg}}
 
* {{dpkg}}
 
* {{snap}}
 
* {{snap}}
 +
* [[Wikipedia:dpkg]]
 +
* [[Wikipedia:APT (Debian)]]
 
* [[wikipedia:Deb_(file_format)]] to understand ''.deb'' internal format an included files: ''preinst, postinst, prerm and postrm.''
 
* [[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
 
* [[wikipedia:apt-file]] to view the contents of debian packages on remote repositories
  
 
{{CC license}}. Source: https://en.wikiversity.org/wiki/Linux_server_administration/dpkg
 
{{CC license}}. Source: https://en.wikiversity.org/wiki/Linux_server_administration/dpkg
  
[[Category:dpkg]]
 
 
[[Category:Server administration]]
 
[[Category:Server administration]]
 
[[Category:Operating systems]]
 
[[Category:Operating systems]]
 
[[Category:Linux]]
 
[[Category:Linux]]

Please note that all contributions to wikieduonline may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Wikieduonline:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Advertising: