Packages · Lesson 6 of 7
yum and apt
0 / 5 checkpoints answered
Repository-aware package managers retrieve metadata, solve dependencies, verify authenticated content, and coordinate transactions. Debian-family systems commonly use APT. Current Fedora and Red Hat Enterprise Linux releases use DNF; on current RHEL, the yum command remains as a compatibility alias for DNF, while older systems used the original YUM implementation.
Always follow the documentation for the installed distribution and release rather than assuming one command set applies everywhere.
Refreshing and Inspecting Metadata
APT separates metadata refresh from package upgrades:
Debian family: $ sudo apt update
Search and inspect before installation:
Debian family: $ apt search package-name
Debian family: $ apt show package-name
RPM family: $ dnf search package-name
RPM family: $ dnf info package-name
Repository configuration determines what these commands can discover. Read source names, architectures, versions, and signing errors carefully.
CheckWhich command displays APT package details for package-name?
press 1/2/3 to answer · → next lesson
Installing Packages
Install by repository package name with:
Debian family: $ sudo apt install package-name
RPM family: $ sudo dnf install package-name
The manager proposes dependencies and any conflicts or replacements. Do not confirm automatically until you have reviewed package origin, version, architecture, download size, disk change, removals, and newly installed dependencies.
CheckWhich current command installs package-name from configured RPM-family repositories?
press 1/2/3 to answer · → next lesson
Removing Packages
Request removal with:
Debian family: $ sudo apt remove package-name
RPM family: $ sudo dnf remove package-name
Removal can affect dependent packages or leave now-unused dependencies and configuration. Review the proposed transaction, distinguish remove from purge semantics on Debian-family systems, and preserve application data according to its own backup and retention procedure. Package removal does not promise to delete user-created data.
CheckWhy should you review a removal transaction before confirming it?
press 1/2/3 to answer · → next lesson
Applying Updates
On an APT system, refresh metadata and then review upgrades as separate successful steps:
$ sudo apt update
$ apt list --upgradable
$ sudo apt upgrade
On a DNF system, inspect and apply available updates with the locally documented workflow:
$ dnf check-update
$ sudo dnf upgrade
An update command can change core libraries, services, kernels, and dependencies. Use backups, maintenance policy, release notes, and restart or reboot planning appropriate to the system. Check command exit semantics: for example, some “check update” operations use a nonzero status to report that updates are available rather than an execution failure.
CheckWhat is the relationship between apt update and apt upgrade?
press 1/2/3 to answer · → next lesson
Choosing dnf or yum
Use dnf in current Fedora and RHEL documentation. A yum command on a recent RHEL system can invoke DNF compatibility behavior, but scripts should not infer the implementation from the executable name alone. On legacy hosts, verify the installed version and supported syntax before translating instructions.
CheckWhat does yum commonly represent on a current RHEL system?
press 1/2/3 to answer · → next lesson
Practice APT in Installing and Removing Packages and DNF/YUM-family concepts in Query and Update Packages with YUM.
Summary
You can now choose and review common repository package operations.
- Use APT on Debian-family systems and DNF on current RPM-family systems.
- Inspect metadata and proposed dependency changes before installation.
- Treat removal as a dependency-aware transaction, not a single-file deletion.
- Separate metadata refresh from upgrade application where the tool does.
- Verify whether
yumis legacy YUM or a DNF compatibility command.
Lesson complete
You finished yum and apt. Nice work — keep the momentum going.