CELE study materials
CELE study resources

CELE: Package management and software installation

CELE · Work through your exam, one topic at a time.

All guide sections

Package management and software installation

This domain, Package management and software installation, tests installing, removing, querying, and verifying software on both major package families, plus knowing when a source build is the right answer.

Two families

  • Debian and Ubuntu: dpkg is the low-level tool and apt resolves dependencies. apt update refreshes metadata, apt upgrade or full-upgrade installs updates, and apt install, apt remove, apt purge, apt search, and apt show do the rest. Query with dpkg -l, dpkg -L pkg, and dpkg -S /path.
  • RHEL, Fedora, and SUSE: rpm is low-level and dnf (or zypper) resolves dependencies. Use dnf install, dnf remove, dnf upgrade, dnf search, dnf info, and dnf provides /path; query with rpm -qa, rpm -ql pkg, and rpm -qf /path.
  • Repositories are defined in /etc/apt/sources.list plus sources.list.d or in /etc/yum.repos.d/*.repo, and GPG keys verify metadata.

Source installs

./configure && make && make install places files under /usr/local by default. This bypasses the package database, so updates and removal become your responsibility. Prefer distribution packages unless you need a specific version or a compile-time option.

Worked example

You need to know which package owns /usr/sbin/sshd. On Debian, run dpkg -S /usr/sbin/sshd; on RHEL, rpm -qf /usr/sbin/sshd. Reasoning: both query the local package database's file lists, which is faster and more reliable than guessing from the binary name. The inverse question, which package would provide a missing file, is answered by dnf provides '*/sshd' or apt-file search.

Traps

  • Mixing dpkg -i with apt and leaving dependencies broken instead of running apt -f install.
  • Installing an RPM built for another distribution or architecture.
  • Removing a library package that other packages depend on.
  • Assuming apt update upgrades software; it only refreshes metadata.