Answer the question
In order to leave comments, you need to log in
How to get a list of dependencies of a package with "under dependencies" in APT or dpkg?
The command apt-cache depends libc6
shows the dependencies for the current package. Is it possible to see all dependencies, including dependencies of dependencies.
For example:
libc6 depends on libgcc1.
libgcc1 depends on gcc-8-base and libc6
gcc-8-base depends on over 15 dependencies.
Is there any way to see them all?
Answer the question
In order to leave comments, you need to log in
Midnight Commander example:
List all recursive dependencies:
apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances mc | grep "^\w" | sort -u
gcc-10-base
libblkid1
libc6
libcrypt1
libext2fs2
libffi7
libgcc-s1
libgcrypt20
libglib2.0-0
libgpg-error0
libgpm2
libmount1
libpcre2-8-0
libpcre3
libselinux1
libslang2
libssh2-1
mc
mc-data
zlib1g
apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances mc | grep "^\w" | sort -u | column
gcc-10-base libext2fs2 libglib2.0-0 libpcre2-8-0 libssh2-1
libblkid1 libffi7 libgpg-error0 libpcre3 mc
libc6 libgcc-s1 libgpm2 libselinux1 mc-data
libcrypt1 libgcrypt20 libmount1 libslang2 zlib1g
apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances mc | grep "^\w" | sort -u)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question