6. Yum and Apt

Lesson Content

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: $ apt install package_name
RPM: $ yum install package_name

Remove a package

Debian: $ apt remove package_name
RPM: $ 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: apt update; apt upgrade
RPM: 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? > - The apt show command provides detailed information on a packag. The commands don’t require you to be root > - This command provides detailed information about a package, its repository, dependencies and a lot more. Knowing what version of a package is available from the official repository could help you in deciding whether you should install it from some other sources. 1. [ ] apt pkginfo 2. [ ] apt details 3. [ ] apt info 4. [x] apt show