Quick Table of Contents

  1. Listing installed packages
  2. Searching for packages
  3. Installing a package
  4. Removing or uninstalling a package
  5. Updating and upgrading packages

Linux software package management

1. 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.

2. Searching for packages

In Ubuntu, use apt-cache search PROGRAM, where PROGRAM is a pattern.

In OpenSUSE, use zypper search PROGRAM.

In CentOS, use yum search PROGRAM.

3. Installing a package

In Ubuntu, use apt-get install PROGRAM.

In CentOS, use yum install PROGRAM. You can use the -y option to answer "yes" to all questions.

4. Removing or uninstalling a package

In Ubuntu, use apt-get remove PROGRAM.

5. 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.