yum and apt

Ah, the Batmans of package management, these systems come with all the fixins to make package installation, removal and changes easier, including installing package dependencies. Two of the most popular management systems is yum and apt. Yum is exclusive to the Red Hat family and apt is exclusively to the Debian family.

Install a package from a repository

Debian: $ sudo apt install package_name
RPM: $ sudo yum install package_name

Note the sudo. Installing and removing software changes the whole system, not just your own files, so these commands need superuser access. Only the commands that just read information, like apt show, work without it.

Remove a package

Debian: $ sudo apt remove package_name
RPM: $ sudo yum erase package_name

Updating packages for a repository

It's always best practice to update your package repositories so they are up to date before you install and update a package.

Debian: sudo apt update; sudo apt upgrade
RPM: sudo yum update

Get information about an installed package

Debian: apt show package_name
RPM: yum info package_name

Exercise

Run through each of these package commands and see the output you receive.

Quiz Question

What command is used to show package information on a Debian system?

Show answer

apt show