LX0-103 · Question #147
Which of the following Debian package system commands will list all partially installed packages and suggest how to get them correctly installed?
The correct answer is A. dpkg -C. dpkg -C (--audit) identifies packages in a partially installed or inconsistent state and suggests corrective actions.
Question
Which of the following Debian package system commands will list all partially installed packages and suggest how to get them correctly installed?
Options
- Adpkg -C
- Bapt-get -u
- Cdpkg -Dh
- Ddpkg -l
- Eapt-get -y
How the community answered
(50 responses)- A86% (43)
- B2% (1)
- C4% (2)
- D2% (1)
- E6% (3)
Why each option
dpkg -C (--audit) identifies packages in a partially installed or inconsistent state and suggests corrective actions.
The dpkg --audit option (short form -C) searches the dpkg package database for packages that are only partially installed or left in an inconsistent state after an interrupted or failed operation. It prints each problematic package along with a description of its broken state. Based on those findings it suggests the appropriate remediation command - typically dpkg --configure or apt-get install -f - to complete the installation correctly.
apt-get -u (--show-upgraded) displays packages that are available for upgrade, not packages that are only partially installed.
dpkg -Dh sets an internal debugging flag using a hexadecimal bitmask and is unrelated to auditing or listing package installation states.
dpkg -l lists all packages known to dpkg with their status codes but does not specifically target partially installed packages or suggest remediation steps.
apt-get -y automatically answers yes to confirmation prompts during package operations and has no function related to auditing or listing partially installed packages.
Concept tested: dpkg audit command for partially installed packages
Source: https://man7.org/linux/man-pages/man1/dpkg.1.html
Topics
Community Discussion
No community discussion yet for this question.