mediumMultiple ChoiceObjective-mapped
XK0-006 Practice Question: After using 'apt-get install' to install several…
After using 'apt-get install' to install several packages, the administrator notices that disk space is low. Which command cleans up the package cache?
⚠ Common exam trap
A common mistake on the Linux+ exam is confusing 'autoremove' (which removes orphaned dependencies) with 'clean' (which clears the download cache).
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
apt-get clean
The 'apt-get clean' command removes all package files (.deb) from the local cache located in /var/cache/apt/archives/. This frees up disk space without affecting installed packages, as the cache is only used for future installations or reinstallations. It is the correct command to clean up the package cache after installations.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
apt-get clean
Why this is correct
Clean deletes the downloaded .deb files in the cache, freeing space.
- ✗
apt-get purge
Why it's wrong here
Purge removes packages and their configuration files; does not clean the cache.
- ✗
apt-get autoremove
Why it's wrong here
Autoremove removes packages that were automatically installed and are no longer needed; it does not clean the cache.
- ✗
apt-get remove
Why it's wrong here
Remove uninstalls packages; it does not clean the download cache.
Go deeper
Related to this question
Learn chapter
Installing Linux and Package Management
Key term
apt
APT (Advanced Package Tool) is a command-line utility used in Debian-based Linux distributions to install, update, remove, and manage software packages from repositories.
Key term
apt-get
apt-get is a command-line tool used in Debian-based Linux distributions to install, update, and remove software packages.
About these practice questions
Courseiva writes every XK0-006 question from scratch — 979 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.