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
Which command removes a package along with its configuration files on Debian-based systems?
Answer: apt-get purge
`apt-get purge` removes the package and its configuration files, whereas `remove` leaves config files behind.
In RPM, what does the `Epoch` field in a package's NEVRA (Name-Epoch-Version-Release-Architecture) override?
Answer: The version comparison order
The Epoch field overrides version comparison, so a package with a higher Epoch is always considered newer regardless of version numbers.
Which file would you edit to pin an APT package to a specific version on Ubuntu?
Answer: /etc/apt/preferences
`/etc/apt/preferences` (or files in `/etc/apt/preferences.d/`) is used for APT pinning to control which versions are installed.
What does `flatpak update` do without specifying a package name?
Answer: Updates all installed Flatpak applications
Running `flatpak update` without arguments updates all installed Flatpak applications and runtimes.
How do you list only manually installed packages (not auto-installed dependencies) with `apt`?
Answer: apt-mark showmanual
`apt-mark showmanual` lists packages that were explicitly installed by the user rather than pulled in automatically as dependencies.
Which `rpm` option extracts files from an RPM package without installing it?
Answer: rpm2cpio pkg.rpm | cpio -idmv
`rpm2cpio` converts an RPM to a cpio archive, which `cpio -idmv` then extracts to the current directory without touching the RPM database.
What is the purpose of `snap refresh --hold` on Ubuntu?
Answer: Temporarily pauses snap updates for a set time
`snap refresh --hold` pauses automatic updates for a configurable duration (default 90 days), not permanently.