Difference between revisions of "Dpkg"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
<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 .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 7: Line 9:
 
* 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>dpkg -i -E ''filename.deb''</code> ( <code>-E, [[--skip-same-version]]</code>) 
  
 
* Remove an installed package:
 
* Remove an installed package:

Latest revision as of 11:20, 16 September 2021

dpkg (1994) 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.

Basic dpkg commands[edit]

  • Install a .deb package:
  • Remove an installed package:
    • dpkg -r package_name
  • Get Information about a package
  • 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
  • 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

Example Outputs of dpkg commands[edit]

Activities[edit]

Basic[edit]

  1. Read apt and snap page
  2. Install a package using dkpg
  3. Understand differences between apt and dpkg

Advanced[edit]

  1. Read uscanhttps://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
  2. Learn about dpkg -V and dpkg -C options

See Also[edit]

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: