nerdexam
CompTIA

LX0-103 · Question #139

Which of the following commands lists the dependencies of a given dpkg package?

The correct answer is C. apt-cache depends package. apt-cache depends displays the dependency information stored in the local package cache for a specified package.

Linux Installation and Package Management

Question

Which of the following commands lists the dependencies of a given dpkg package?

Options

  • Aapt-cache depends-on package
  • Bapt-cache dependencies package
  • Capt-cache depends package
  • Dapt-cache requires package

How the community answered

(29 responses)
  • B
    7% (2)
  • C
    90% (26)
  • D
    3% (1)

Why each option

apt-cache depends displays the dependency information stored in the local package cache for a specified package.

Aapt-cache depends-on package

'depends-on' is not a recognized subcommand of apt-cache and will return an error.

Bapt-cache dependencies package

'dependencies' is not a valid apt-cache subcommand.

Capt-cache depends packageCorrect

The apt-cache depends command queries the local package metadata cache and outputs all declared dependencies, pre-dependencies, recommends, and suggests for the named package. It shows what other packages must or should be installed to satisfy the given package's requirements.

Dapt-cache requires package

'requires' is not a valid apt-cache subcommand.

Concept tested: Querying package dependencies with apt-cache

Source: https://manpages.debian.org/stable/apt/apt-cache.8.en.html

Topics

#apt-cache depends#package dependencies#dpkg#apt-cache

Community Discussion

No community discussion yet for this question.

Full LX0-103 Practice