This is a quick summary of linux package commands, both for rpm (Redhat, Fedora, ...) and dpkg (Debian, Ubuntu, ...)

I'm alot more familiar with RPMs so there may be some missing or wrong info for the dpkg stuff.

Install Package
rpm -ihv <.rpm files>
rpm -Uhv <.rpm files>

I use the second one which is actually Update as thats more often what you mean, and it works for new installs also


dpkg -i <.deb file>
Removing Package
rpm -e <package>

dpkg -P <package>
List Installed Packages
rpm -q <package>
rpm -qa

Lists all installed


dpkg -l [package pattern]

Lists all of no pattern given

dpkg --get-selections
List Package Files
What package provides a file
rpm -q --whatprovides /path/to/file

dpkg -S /path/to/file
Package Info/Status
rpm -qi <package>
rpm -qi -p <.rpm files>

dpkg -p <package>
dpkg -s <package>
dpkg -I <.deb file>