Rpm and dpkg commands

From Thomas-Krenn-Wiki
Jump to navigation Jump to search

With the commands rpm and dpkg, you can administrate the package administration of your Linux system. This article shows some frequently used options for these commands.

Install package

rpm command dpkg command description
rpm -i {packagename.rpm} dpkg -i {packagename.deb} installs the specified package
rpm -U {packagename.rpm} dpkg -i {packagename.deb} updates the specified package

Remove package

rpm command dpkg command description
rpm -e {packagename} dpkg -r {packagename} removes the specified package

Request package

rpm command dpkg command apt command description
rpm -qa dpkg -l shows all installed packages
rpm -ql {packagename} dpkg -L {packagename} shows all files of a package that are already installed
rpm -qi {packagename} dpkg -p {packagename} apt show {packagename} shows all information of a package that is already installed
rpm -qpl {packagename.rpm} dpkg -c {packagename.deb} shows all files in a package file (that is not yet installed)
rpm -qpi {packagename.rpm} dpkg -I {packagename.deb} shows information of a package file (that is not yet installed)
rpm -qf {/folder/file} dpkg -S {/folder/file} shows to which package the specified file belongs to

Notification:apt-cache showpkg {packagename} displays package dependencies on .deb-based distributions (Dependencies, Reverse Depends, Provides, Reverse Provides).[1]

Verify package

rpm command dpkg command description
rpm -Va - verifies all installed packages
rpm -V {packagename} - verifies an installed package

More information

References

  1. apt-cache (wiki.ubuntuusers.de)


Author: Werner Fischer

Werner Fischer, working in the Knowledge Transfer team at Thomas-Krenn, completed his studies of Computer and Media Security at FH Hagenberg in Austria. He is a regular speaker at many conferences like LinuxTag, OSMC, OSDC, LinuxCon, and author for various IT magazines. In his spare time he enjoys playing the piano and training for a good result at the annual Linz marathon relay.


Translator: Alina Ranzinger

Alina has been working at Thomas-Krenn.AG since 2024. After her training as multilingual business assistant, she got her job as assistant of the Product Management and is responsible for the translation of texts and for the organisation of the department.


Related articles

Data Synchronization with rsync under Linux
Linux-tool TMUX
Setting of CPU Governor under Linux