0

Is there a way I can use apt-get install command to install a package and its first level dependencies only instead of all the dependencies recursively?

EDIT: I am dealing with ROS and would like to install a single package with only its first level dependencies. I don't actually want to install or update the system dependencies that this ROS package depends on, "recursively". During running a particular application if any 'dependency-not found' error is thrown, I would like to see what exactly is missing. I hope this helps. PS: Also, it seems that there is an apt-get command to install only the first-level dependencies but couldn't find any. Any help is greatly appreciated.

samhitha
  • 167

1 Answers1

0

No.

There is no way to use apt-get and install packages without fulfilling dependencies. You can download the individual packages and use dpkg, but the packages will not be fully installed in that case, and programs may not even be startable.

muru
  • 197,895
  • 55
  • 485
  • 740
  • I found a command debtree --max-depth=number that limits the traversal of dependency depth. Is there a way I can integrate this with apt-get install to serve my purpose? something like debtree --max-depth=1|sudo apt-get install ? – samhitha Mar 02 '17 at 04:40
  • No. Use dpkg if you want to ignore dependencies. – muru Mar 02 '17 at 04:47
  • Could you please tell how exactly I can use it. and also, when installing individual dependencies (top-level) using dpkg, won't their dependencies also get installed? – samhitha Mar 02 '17 at 05:54
  • http://askubuntu.com/a/40781/158442 dpkg doesn't download or install anything other than what it has been told to. – muru Mar 02 '17 at 05:55