โ† All Linux Flashcard Decks

Package Management Flashcards

7 cards from real Linux practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Package Management flashcards as text
  1. What is the function of `apt-get -f install`?

    Answer: Fixes broken package dependencies

    `apt-get -f install` (fix-broken) attempts to repair a system with broken dependencies by installing or removing packages as needed.

  2. Which command would you use to add a new Flatpak remote repository named 'flathub'?

    Answer: flatpak remote-add --if-not-exists flathub

    `flatpak remote-add` registers a new remote repository, and `--if-not-exists` prevents an error if it's already configured.

  3. What does `rpm --rebuilddb` do?

    Answer: Rebuilds the RPM database from installed package headers

    `rpm --rebuilddb` reconstructs the RPM database files from the installed package headers, used to fix a corrupted database.

  4. How do you prevent a specific package from being upgraded with `apt-mark`?

    Answer: apt-mark hold package

    `apt-mark hold package` marks a package so that `apt-get upgrade` and `apt upgrade` skip it.

  5. Which `dnf` module command switches a module stream to a different version?

    Answer: dnf module switch-to

    `dnf module switch-to` changes the active stream of a module (e.g., switching PHP from 7.4 to 8.0) and updates packages accordingly.

  6. What is the role of `/etc/yum.repos.d/` directory?

    Answer: Contains repository definition files for YUM/DNF

    Each `.repo` file in `/etc/yum.repos.d/` defines a repository that YUM or DNF can use to find and install packages.

  7. Which command lists all available versions of a package in APT's cache?

    Answer: apt-cache policy package

    `apt-cache policy package` shows the installed version, candidate version, and all available versions with their repository priorities.