packages:package_dependencies
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
packages:package_dependencies [2016/07/01 14:59] – peter | packages:package_dependencies [2019/12/01 11:53] (current) – removed peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Packages - Find Package Dependencies ====== | ||
- | |||
- | <file bash> | ||
- | #!/bin/bash | ||
- | # Small script to recursively show dependencies of packages | ||
- | # Author: Remy van Elst < | ||
- | |||
- | pkgdep() { | ||
- | apt-cache depends --installed $1 | awk -F\: ' | ||
- | } | ||
- | |||
- | for i in $(pkgdep $1); do | ||
- | pkgdep $i | ||
- | done | sort -u | ||
- | < | ||
- | |||
- | |||
- | Save and **chmod +x**. Execute with one package as parameter. | ||
- | |||
- | If you also want non-installed packages shown, remove the **< | ||
- | |||
- | Example: | ||
- | |||
- | <code bash> | ||
- | dep.sh bash | ||
- | bash | ||
- | debconf | ||
- | debianutils | ||
- | dpkg | ||
- | initscripts | ||
- | libc6 | ||
- | libc-bin | ||
- | libgcc1 | ||
- | libncurses5 | ||
- | locales | ||
- | multiarch-support | ||
- | sensible-utils | ||
- | tzdata | ||
- | < | ||
- | |||
packages/package_dependencies.1467385157.txt.gz · Last modified: 2020/07/15 09:30 (external edit)