Using RPM and dpkg

The /bin/rpm program on Red Hat and derivitives and the /usr/bin/dpkg on
Debian and derivitives are used to control the management of packages.
• Remove a package
# rpm -e <package-name>
# dpkg -r <package-name>
• List contents of entire package
# rpm -qvl <package-name.rpm>
# dpkg -c <package-name.deb>
• List all installed packages with info about each
# rpm -qvia
# dpkg -l
• List contents of a package
# rpm -qvpl <package-name.rpm>
# dpkg -c <package-name.deb>
• Print information about a package
# rpm -qpi <package-name.rpm>
# dpkg -I <package-name.deb>
• Verify package characteristics (basic integrity check)
# rpm -Va
# debsums -a
• Determine to which package a file belongs
# rpm -qf </path/to/file>
# dpkg -S </path/to/file>
• Install new package
# rpm -Uvh <package-name.rpm>
# dpkg -i <package-name.deb>

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.