Skip to content

Instantly share code, notes, and snippets.

@tonejito
Created January 18, 2019 05:07
Show Gist options
  • Save tonejito/30f17a35e662ec69a53cb4c7681b0b5b to your computer and use it in GitHub Desktop.
Save tonejito/30f17a35e662ec69a53cb4c7681b0b5b to your computer and use it in GitHub Desktop.
List all dependencies of a @Debian package via apt-cache
#!/bin/bash -vx
# SBoM - Software Bill of Materials
# As seen in @TheHackersNews
# https://twitter.com/TheHackersNews/status/1085606422379970560?s=19
apt-cache depends --recurse \
--no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances --no-pre-depends \
${1}
| grep "^\w"
| sort -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment