GNU/Linux distributions are primarily user either rpm or deb for their packages. This articles discusses uses of dpkg and rpm
GNU/Linux like Debian, Ubuntu, mint use deb packaging to install or remove packages the main command is dpkg (Note: It will not automatically download and install required dependencies). Apart from dpkg there is apt which provides a high-level commandline interface for the package management system.
In case of Redhat, Fedora, Suse etc which use rpm style package main command to install/manage the package is rpm. In case of Redhat one could install yum to manage packages much more easily as compared to using the default rpm command. It should be noted that SuSe has its own tool called 'zypper'
Here is a list of commands comparison for basic dpkg vs rpm
Sr. | Requirement | dpkg | rpm |
1 | Install a package. (The package should be downloaded) |
dpkg -i packagename.deb | rpm -i packagename.rpm |
2 | Remove/Erase installed package |
dpkg -r packagename to completely remove package including config file use dpkg -P packagename |
rpm -e packagename |
3 | Upgrade Package | NA | rpm -U packagename |
4 | Get the list of all installed packages on system | dpkg -l | rpm -qpl |
5 | List dependencies of package | dpkg -I package.deb | rpm -qpR package.rpm |
6 | List dependencies of packages (installed) |
dpkg -s or dpkg -s packagename | grep 'Depends' |
rpm -qR |
Add new comment