UPDATE: Thanks To Julian, Now I know you can simply use
aptitude download ‘?reverse-depends(PKGNAME)’
Several days ago a colleague asked me if there’s a way to download the dependencies of a package in a Debian based distribution, for an offline use.
Sound like an easy task, and after a while of thinking, i got remembered in a tool that used to ship with Ubuntu back in the days, called “Synaptic”, that used to have that tool.
However, there are some cons to that tool. first of all it’s a GUI one (GUI? Eeeeww!”), and second, it downloads only the packages missing to your current installation, so if you’re offline installation dismatch your own one, you’ve got a problem.
So I decided to take it as a challenge, and ended up with a little script I hope will help ya’ll. And you may find it in my github of course…
I think it’s pretty much straight-forward code, but if you have any questions you’re more than welcome to ask.