Linux software package management
Listing installed packages
Section titled “Listing installed packages”In Ubuntu, use dpkg -l to list all installed packages.
In OpenSUSE, use zypper pa | grep ^i to list all installed packages.
Searching for packages
Section titled “Searching for packages”In Ubuntu, use apt-cache search PACKAGE, where PACKAGE is a pattern.
In OpenSUSE, use zypper search PACKAGE/
In CentOS, use yum search PACKAGE.
Display info about a package
Section titled “Display info about a package”In Ubuntu, use apt-cache show PACKAGE. This will display the version and description of the package.
Installing a package
Section titled “Installing a package”In Ubuntu, use apt-get install PACKAGE.
In CentOS, use yum install PACKAGE. You can use the -y option to answer “yes” to all questions.
Removing or uninstalling a package
Section titled “Removing or uninstalling a package”In Ubuntu, use apt-get remove PACKAGE.
Updating and upgrading packages
Section titled “Updating and upgrading packages”Out of date software can pose a security risk, but upgrading can also introduce bugs. Remember to backup your data and configuration before upgrading packages.
In Ubuntu, use apt-get update to retrieve a new list of packages. Then run apt-get upgrade to
upgrade packages to newer versions. Some packages, like the kernel, won’t be upgraded automatically. To update these
run apt-get dist-upgrade instead.