Main Difference
From user’s point of view, there isn’t much difference in these tools. The RPM and DEB formats are both just archive files, with some metadata attached to them. They are both equally arcane, have hardcoded install paths and only differ in subtle details. DEB files are installation files for Debian based distributions. RPM files are installation files for Red Hat based distributions. Ubuntu is based on Debian’s package manage based on APT and DPKG. Red Hat, CentOS and Fedora are based on the old Red Hat Linux package management system, RPM.
DEB is the extension of the Debian software package format and the most often used name for such binary packages. DEB was developed by Bedian
It is a package management system. The name RPM variously refers to the .rpm file format, files in this format, software packaged in such files, and the package manager itself. RPM was intended primarily for Linux distributions; the file format is the baseline package format of the Linux Standard Base. RPM was developed by Community & Red Hat.
Common Command:
1. To Install the package
rpm -ivh {rpm-file}
Example:
rpm -ivh mozilla-mail-1.7.5-17.i586.rpm
rpm -ivh--test mozilla-mail-1.7.5-17.i586.rpm
2. To Upgrade package
rpm -Uvh mozilla-mail-1.7.6-12.i586.rpm
rpm -Uvh--test mozilla-mail-1.7.6-12.i586.rpm
3. To Erase/remove/ an installed package
rpm -ev {package}
rpm -ev--nodeps {package} // without checking for dependencies
rpm -ev mozilla-mail
rpm -ev--nodeps mozilla-mail
4. To Display list all installed packages
rpm -qa
rpm -qa | less
5. To Display installed information along with package version and short description
rpm -qi {package}
rpm -qi mozilla-mail
6. To Find out what package a file belongs to i.e. find what package owns the file
rpm -qf {/path/to/file}
rpm -qf /etc/passwd
rpm -qf /bin/bash
7. To Display list of configuration file(s) for a package
rpm -qc {pacakge-name}
rpm -qc httpd
8. To Display list of configuration files for a command
rpm -qcf {/path/to/file}
rpm -qcf /usr/X11R6/bin/xeyes
9. To Display list of all recently installed RPMs
rpm -qa--last
rpm -qa--last | less
10. To Find out what dependencies a rpm file has
rpm -qR {package}
rpm -qR bash
rpm -qpR mediawiki-1.4rc1-4.i586.rpm
Key Differences