CompTIA Linux+ Practice Questions: Package Management

8 free, exam-style CompTIA Linux+ (XK0-006) practice questions covering Package Management, each with the correct answer and an explanation. Start a timed exam below, or scroll on to read through the questions.

🧠

Mini Exam

25 Questions · 50 minutes

Start Quiz 🚀
🏆

Mock Linux+ Exam

85 Questions · 165 minutes

Start Quiz 🚀
📅

Daily Quiz

10 Questions · 20 minutes

Start Quiz 🚀
🎯

Standard Practice

50 Questions · 100 minutes

Start Quiz 🚀

Package Management practice questions

Answers and explanations are shown. Take the timed exam above to test yourself first.

Q1. Which package manager uses .deb files?

  • A.yum
  • B.dnf
  • C.apt✓ Correct
  • D.zypper
Explanation: apt is used by Debian-based systems like Ubuntu. Learn more.

Q2. What command lists RPM package dependencies?

  • A.rpm -qa
  • B.rpm -ql
  • C.rpm -qR✓ Correct
  • D.rpm -V
Explanation: rpm -qR <package> shows requirements/dependencies. Learn more.

Q3. Which command lists all available yum repositories?

  • A.yum repolist✓ Correct
  • B.yum list repos
  • C.yum config-manager --list
  • D.cat /etc/yum.repos.d/*
Explanation: yum repolist shows enabled repositories. Learn more.

Q4. Which command lists available yum package groups?

  • A.yum grouplist✓ Correct
  • B.yum list groups
  • C.yum groupavailable
  • D.yum categories
Explanation: Lists installable package groups. Learn more.

Q5. Which tool is commonly used on Debian-based systems to install packages?

  • A.apt✓ Correct
  • B.dnf
  • C.zypper only
  • D.rpm -qa only
Explanation: apt is the package management front end commonly used by Debian and Ubuntu systems. Learn more.

Q6. Which command searches package contents on RPM-based systems after installing dnf-utils or equivalent tooling?

  • A.repoquery✓ Correct
  • B.crontab
  • C.hostnamectl
  • D.journalctl -f only
Explanation: repoquery can query package metadata and contents in RPM-based repositories. Learn more.

Q7. Which command can reverse a package transaction recorded by DNF?

  • A.dnf history undo TRANSACTION_ID✓ Correct
  • B.dnf cache reverse
  • C.rpm --rollback-latest
  • D.yumdb restore-all
Explanation: DNF records package transactions in its history, and dnf history undo can attempt to reverse the changes from a selected transaction. Learn more.

Q8. Which command prevents a selected Debian package from being automatically upgraded?

  • A.apt-cache lock PACKAGE
  • B.apt-mark hold PACKAGE✓ Correct
  • C.dpkg --freeze-all PACKAGE
  • D.apt pin --temporary PACKAGE
Explanation: apt-mark hold marks a package so normal upgrade operations retain its currently installed version. Learn more.

More CompTIA Linux+ practice topics

Keep studying CompTIA Linux+

Full CompTIA Linux+ practice exam · CompTIA Linux+ study guide · All CompTIA practice questions

Last updated