Interactive package dependency tree

I am always frustrated when dnf5 pulls some doubtful stuff to my system with no indication why.

For example, dnf install -y gcc graphviz libffi-devel python3-devel python3-psycopg2 pulls in openh264 video codec, which is really undesirable on a headless box used for compiling stuff. There is also a lot of stuff I am almost 100% sure I don’t need.

 > [ 5/13] RUN dnf install -y gcc graphviz libffi-devel python3-devel python3-psycopg2:
1.283 Updating and loading repositories:
2.237 Repositories loaded.
2.657 Package "python3-devel-3.14.7-1.fc44.x86_64" is already installed.
2.657 
2.661 Package                               Arch   Version                          Repository                 Size
2.661 Installing:
2.661  gcc                                  x86_64 0:16.2.1-2.fc44                  updates               121.8 MiB
2.661  graphviz                             x86_64 0:14.1.4-2.fc44                  updates                 4.0 MiB
2.661  libffi-devel                         x86_64 0:3.5.2-2.fc44                   fedora                 33.9 KiB
2.661  python3-psycopg2                     x86_64 0:2.9.10-5.fc44                  fedora                636.2 KiB
2.661 Installing dependencies:
2.661  adobe-mappings-cmap                  noarch 0:20231115-5.fc44                fedora                 15.2 MiB
2.661  adobe-mappings-cmap-deprecated       noarch 0:20231115-5.fc44                fedora                582.1 KiB
2.661  adobe-mappings-pdf                   noarch 0:20190401-12.fc44               fedora                  4.4 MiB
2.661  avahi-libs                           x86_64 0:0.9~rc2-8.fc44                 fedora                179.2 KiB
2.661  binutils                             x86_64 0:2.46.1-1.fc44                  updates                28.2 MiB
2.661  bubblewrap                           x86_64 0:0.12.0-1.fc44                  updates               139.8 KiB
2.661  cairo                                x86_64 0:1.18.4-6.fc44                  fedora                  1.8 MiB
2.661  cairo-gobject                        x86_64 0:1.18.4-6.fc44                  fedora                 31.0 KiB
2.661  cpp                                  x86_64 0:16.2.1-2.fc44                  updates                42.6 MiB
2.661  cups-filesystem                      noarch 1:2.4.19-3.fc44                  updates                 0.0   B
2.661  cups-libs                            x86_64 1:2.4.19-3.fc44                  updates               634.6 KiB
2.661  dbus-libs                            x86_64 1:1.16.2-1.fc44                  fedora                357.4 KiB
2.661  elfutils-debuginfod-client           x86_64 0:0.196-1.fc44                   updates                83.8 KiB
2.661  fribidi                              x86_64 0:1.0.16-4.fc44                  fedora                190.0 KiB
2.661  gd                                   x86_64 0:2.3.3-21.fc44                  fedora                411.5 KiB
2.661  gdk-pixbuf2                          x86_64 0:2.44.6^really2.44.4-3.fc44     updates                 2.5 MiB
2.661  glibc-devel                          x86_64 0:2.43-8.fc44                    updates                 2.3 MiB
2.661  glycin-libs                          x86_64 0:2.1.5-1.fc44                   updates                 4.3 MiB
2.661  glycin-loaders                       x86_64 0:2.1.5-1.fc44                   updates                13.8 MiB
2.661  gobject-introspection                x86_64 0:1.86.0-3.fc44                  fedora                397.3 KiB
2.661  google-droid-sans-fonts              noarch 0:20200215-24.fc44               fedora                  6.3 MiB
2.661  gpgme                                x86_64 0:2.0.1-5.fc44                   updates               617.8 KiB
2.661  gpgmepp                              x86_64 0:2.0.1-5.fc44                   updates               441.6 KiB
2.661  graphviz-libs                        x86_64 0:14.1.4-2.fc44                  updates                 1.3 MiB
2.661  gts                                  x86_64 0:0.7.6-52.20121130.fc44         fedora                650.9 KiB
2.661  highway                              x86_64 0:1.3.0-2.fc44                   fedora                  5.5 MiB
2.661  jansson                              x86_64 0:2.14-4.fc44                    fedora                 88.9 KiB
2.661  jbig2dec-libs                        x86_64 0:0.20-8.fc44                    fedora                168.8 KiB
2.661  jbigkit-libs                         x86_64 0:2.1-33.fc44                    fedora                117.2 KiB
2.661  kernel-headers                       x86_64 0:7.2.4-200.fc44                 updates                 7.0 MiB
2.661  lasi                                 x86_64 0:1.1.3-18.fc44                  fedora                126.6 KiB
2.661  lcms2                                x86_64 0:2.16-7.fc44                    fedora                445.7 KiB
2.661  libICE                               x86_64 0:1.1.2-4.fc44                   fedora                198.3 KiB
2.661  libSM                                x86_64 0:1.2.5-4.fc44                   fedora                100.9 KiB
2.661  libXext                              x86_64 0:1.3.6-5.fc44                   fedora                 89.8 KiB
2.661  libXpm                               x86_64 0:3.5.17-7.fc44                  fedora                148.2 KiB
2.661  libXt                                x86_64 0:1.3.1-4.fc44                   fedora                437.6 KiB
2.661  libaom                               x86_64 0:3.13.3-1.fc44                  updates                 5.1 MiB
2.661  libatomic                            x86_64 0:16.2.1-2.fc44                  updates                45.6 KiB
2.661  libavif                              x86_64 0:1.3.0-4.fc44                   fedora                265.8 KiB
2.661  libdatrie                            x86_64 0:0.2.14-2.fc44                  fedora                 61.7 KiB
2.661  libdav1d                             x86_64 0:1.5.3-1.fc44                   fedora                  1.7 MiB
2.661  libgs                                x86_64 0:10.06.0-2.fc44                 fedora                 24.6 MiB
2.661  libheif                              x86_64 0:1.21.2-1.fc44                  fedora                  1.8 MiB
2.661  libijs                               x86_64 0:0.35-26.fc44                   fedora                 61.4 KiB
2.661  libimagequant                        x86_64 0:4.1.0-2.fc44                   fedora                707.6 KiB
2.661  libjpeg-turbo                        x86_64 0:3.1.3-1.fc44                   fedora                818.2 KiB
2.661  libjxl                               x86_64 1:0.11.2-1.fc44                  updates                 4.1 MiB
2.661  liblerc                              x86_64 0:4.0.0-10.fc44                  fedora                647.9 KiB
2.661  libmpc                               x86_64 0:1.4.1-1.fc44                   updates               168.7 KiB
2.661  libopenjph                           x86_64 0:0.25.3-3.fc44                  fedora                482.1 KiB
2.661  libpaper                             x86_64 1:2.1.1-10.fc44                  fedora                 48.6 KiB
2.661  libpq                                x86_64 0:18.0-4.fc44                    fedora                  1.0 MiB
2.661  librsvg2                             x86_64 0:2.62.3-1.fc44                  updates                 5.0 MiB
2.661  libseccomp                           x86_64 0:2.6.1-2.fc44                   updates               222.2 KiB
2.661  libthai                              x86_64 0:0.1.30-2.fc44                  fedora                800.9 KiB
2.661  libtiff                              x86_64 0:4.7.2-1.fc44                   updates               640.4 KiB
2.661  libvmaf                              x86_64 0:3.0.0-5.fc44                   fedora                846.8 KiB
2.661  libwebp                              x86_64 0:1.6.0-3.fc44                   fedora                968.0 KiB
2.661  libxcrypt-devel                      x86_64 0:4.5.2-3.fc44                   fedora                 31.0 KiB
2.661  libyuv                               x86_64 0:0-0.61.20260213git6067afd.fc44 fedora                683.7 KiB
2.661  lzo                                  x86_64 0:2.10-16.fc44                   fedora                174.8 KiB
2.661  make                                 x86_64 1:4.4.1-12.fc44                  fedora                  1.8 MiB
2.661  netpbm                               x86_64 0:11.13.00-2.fc44                fedora                583.9 KiB
2.661  nspr                                 x86_64 0:4.39.0-4.fc44                  updates               327.1 KiB
2.661  nss                                  x86_64 0:3.127.0-1.fc44                 updates                 2.0 MiB
2.661  nss-softokn                          x86_64 0:3.127.0-1.fc44                 updates                 2.1 MiB
2.661  nss-softokn-freebl                   x86_64 0:3.127.0-1.fc44                 updates               998.9 KiB
2.661  nss-sysinit                          x86_64 0:3.127.0-1.fc44                 updates                17.9 KiB
2.661  nss-util      Total size of inbound packages is 114 MiB. Need to download 114 MiB.
2.664 After this operation, 372 MiB extra will be used (install 372 MiB, remove 0 B).
2.664                        x86_64 0:3.127.0-1.fc44                 updates               212.7 KiB
2.664  openh264                             x86_64 0:2.6.0-3.fc44                   fedora-cisco-openh264   1.1 MiB
2.664  openjpeg                             x86_64 0:2.5.4-3.fc44                   fedora                464.2 KiB
2.664  pango                                x86_64 0:1.57.1-1.fc44                  fedora                  1.0 MiB
2.664  pixman                               x86_64 0:0.46.2-3.fc44                  fedora                718.2 KiB
2.664  poppler                              x86_64 0:26.01.0-3.fc44                 fedora                  4.0 MiB
2.664  poppler-data                         noarch 0:0.4.11-11.fc44                 fedora                 12.3 MiB
2.664  poppler-glib                         x86_64 0:26.01.0-3.fc44                 fedora                658.8 KiB
2.664  rav1e-libs                           x86_64 0:0.8.1-3.fc44                   fedora                  3.1 MiB
2.664  shared-mime-info                     x86_64 0:2.4-3.fc44                     fedora                  5.2 MiB
2.664  svt-av1-libs                         x86_64 0:3.1.2-2.fc44                   fedora                  5.6 MiB
2.664  urw-base35-bookman-fonts             noarch 0:20200910-27.fc44               fedora                  1.4 MiB
2.664  urw-base35-c059-fonts                noarch 0:20200910-27.fc44               fedora                  1.4 MiB
2.664  urw-base35-d050000l-fonts            noarch 0:20200910-27.fc44               fedora                 84.3 KiB
2.664  urw-base35-fonts                     noarch 0:20200910-27.fc44               fedora                  5.3 KiB
2.664  urw-base35-fonts-common              noarch 0:20200910-27.fc44               fedora                 37.4 KiB
2.664  urw-base35-gothic-fonts              noarch 0:20200910-27.fc44               fedora                  1.2 MiB
2.664  urw-base35-nimbus-mono-ps-fonts      noarch 0:20200910-27.fc44               fedora                  1.0 MiB
2.664  urw-base35-nimbus-roman-fonts        noarch 0:20200910-27.fc44               fedora                  1.4 MiB
2.664  urw-base35-nimbus-sans-fonts         noarch 0:20200910-27.fc44               fedora                  2.4 MiB
2.664  urw-base35-p052-fonts                noarch 0:20200910-27.fc44               fedora                  1.5 MiB
2.664  urw-base35-standard-symbols-ps-fonts noarch 0:20200910-27.fc44               fedora                 64.9 KiB
2.664  urw-base35-z003-fonts                noarch 0:20200910-27.fc44               fedora                390.8 KiB
2.664 
2.664 Transaction Summary:
2.664  Installing:        96 packages

It may be graphviz or any of its dependencies. I am certain that with some dnf and rpm commands I could find out the ancestor branch of openh264, but… there are two problems..

  1. I could never remember the rpm/dnf syntax, so I keep opening Google search to get one.
  2. Typing commands in terminal may work for a single package, but if I want to do a quick check “why a certain package is being pulled in” on each update, that is not practical.

So, what I want is the Web UI (because I still have to open the browser) where I paste a package list like gcc graphviz libffi-devel python3-devel python3-psycopg2 and it renders the dependencies tree top down down with these packages listed at the top and connections going down. And when I click the dependency, it should highlight the path to the top.

Maybe such tool exists already. Please paste your link if you’ve found one. Maybe it could be added to https://packages.fedoraproject.org

A simple way to do that from the command line is to run, e.g., dnf install gcc graphviz libffi-devel python3-devel python3-psycopg2. As long as you omit the -y, dnf will display a list of what will be downloaded before it downloads the packages and prompt for confirmation. I don’t know why online examples everywhere show that command with the -y. They shouldn’t.

I don’t know if there is a way to get dnf to show the output of what is about to be installed as a dependency tree. If it doesn’t have that feature already, IMO it would be a reasonable feature request for the dnf package.

1 Like