Courseiva
Linux Installation and Package ManagementmediumMultiple SelectObjective-mapped

LPIC-1 Linux Installation and Package Management Practice Question

Which TWO of the following commands can be used to list all installed packages on a Debian-based system?

⚠ Common exam trap

It's easy for candidates to confuse `dpkg --get-selections` with a command that lists only installed packages, when in fact it lists all packages with their selection state (including those marked for removal), requiring additional filtering to isolate installed ones.

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 list --installed

`apt list --installed` is a modern APT command that lists all installed packages on Debian-based systems. Option D is correct because `dpkg -l` displays the status and names of all packages known to dpkg, including those installed, effectively listing installed packages.

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 check

    Why it's wrong here

    Checks for broken dependencies.

  • apt list --installed

    Why this is correct

    Lists installed packages.

  • apt-cache showpkg

    Why it's wrong here

    Shows package details, not a list.

  • dpkg -l

    Why this is correct

    Lists all installed packages.

  • dpkg --get-selections

    Why it's wrong here

    Lists packages with selection state, but can be used; however, not as direct as dpkg -l.

About these practice questions

Courseiva writes every LPIC-1 question from scratch — 527 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 →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-1 practice question is part of Courseiva's free LPI 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 LPIC-1 exam.