RHCSA Software Package Management Flashcards
7 cards from real RHCSA practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 RHCSA Software Package Management flashcards as text
Which command rolls back the most recent DNF transaction?
Answer: dnf history undo last
'dnf history undo last' reverses the most recent transaction; you can also specify a transaction ID instead of 'last'.
How do you install a specific version of a package, e.g., httpd version 2.4.37?
Answer: dnf install httpd-2.4.37
DNF uses the package-version syntax 'packagename-version' (including release and arch optionally) to pin a specific version for installation.
A package was installed via RPM but is not showing up in 'dnf list installed'. What is the most likely reason?
Answer: rpm and dnf share the same RPM database, so this should not happen โ the package would appear
Both rpm and dnf use the same RPM database (/var/lib/rpm), so any rpm-installed package is visible to 'dnf list installed'.
What does the 'dnf autoremove' command do?
Answer: Removes packages that were installed as dependencies but are no longer needed
'dnf autoremove' cleans up leaf dependency packages that were auto-installed but are no longer required by any explicitly installed package.
How can you enable a disabled repository for a single DNF command without editing its .repo file?
Answer: dnf --enablerepo= install
The --enablerepo flag temporarily enables a disabled repository for just that invocation without modifying the configuration file.
Which RPM query shows all configuration files owned by the 'sshd' package?
Answer: rpm -qc openssh-server
'rpm -qc' lists all configuration files (marked %config in the spec) belonging to a package.
What happens when you run 'dnf upgrade' with no package name specified?
Answer: All installed packages with available updates are upgraded
'dnf upgrade' with no arguments updates all installed packages for which newer versions exist in enabled repositories.