Which of the following commands lists the dependencies of a given dpkg package?
Click on the arrows to vote for the correct answer
A. B. C. D.C
The correct answer is C. apt-cache depends package.
When installing or removing packages in Debian-based systems using the dpkg package manager, dependencies can become a concern. Dependencies are other packages that a package requires in order to function properly.
The apt-cache
command is used to search the local package database, and can be used to query package information, including dependencies. The correct option to list the dependencies of a given dpkg package is apt-cache depends package
. Here's what the other options do:
A. apt-cache depends-on package
is not a valid command. There is no "depends-on" option for the apt-cache
command.
B. apt-cache dependencies package
is a valid command, but it does not list the dependencies of a package. Instead, it lists the reverse dependencies, which are packages that depend on the given package.
D. apt-cache requires package
is not a valid command. There is no "requires" option for the apt-cache
command.
Therefore, the correct option to list the dependencies of a given dpkg package is apt-cache depends package
.