sudo apt-get install $(apt-cache depends | grep Depends | sed “s/.*ends:\ //” | tr ‘\n’ ‘ ‘)

Where is the name of the package you want to install the dependencies for. A very cool command indeed especially when you want to build something from src instead of having your package manager download it.

From here.

Mario Loria is a builder of diverse infrastructure with modern workloads on both bare-metal and cloud platforms. He's traversed roles in system administration, network engineering, and DevOps. You can learn more about him here.