Sometimes you come into a situation when you want to have certain dependencies of a package installed but don’t want to have your system messed up with some other dependencies of a certain package. As this came across my way again today, I decided to share my solution in these cases.

Today I needed a solution for installing cuda libraries without installing nvidia drivers as those break the target systems. To have a quick overview which dependencies of cuda request the installation of nvidia drivers I decided to create a dot file with debtree and visualize it.

You can either create a png of this graph:

debtree --max-depth=4 cuda-10-0 >/tmp/cuda-10-0.dot
dot -T png -o /tmp/cuda10-0.png /tmp/cuda-10-0.dot

or simply run that single line to view the resulting postscript in okular: debtree --max-depth=4 cuda-10-0 | dot -Tps | okular - &

So for me the solution should be to install cuda-toolkit-10-0 and cuda-libraries-10-0.