Ask Your Question

Dependency removal

asked 2011-06-15 09:41:19 -0500

kissandra79 gravatar image

updated 2011-06-16 14:54:26 -0500

tfoote gravatar image

Using rosdep it is possible to install system dependencies. Is there a command to uninstall the same system dependencies.

For example, you can do,

rosdep install rxtools

at the command line. Now is there any command to uninstall rxtools?

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2011-06-16 00:28:44 -0500

updated 2011-06-16 00:30:22 -0500

To get a list of debian packages required by a ROS package, you can run:

rosdep depdb rospackage(s) > debs.txt

Now you'll have to do some search-and-replace (or some nifty sed magic) to get a line-separated list of debian packages. Then you can run:

sudo xargs -d '\n' -a debs.txt aptitude markauto

... which will pipe the packages into aptitude markauto. Using markauto instead of remove has the advantage that only those packages are removed that are not needed by any other package in the system. Finally, run


... to review the list of packages that would be removed (press 'g'). If you want to keep some package, just highlight it and press '+' to mark it as "manually installed" again. Finally, press 'g' again to remove the packages.

edit flag offensive delete link more


I would add one thing: For each dep in the debs.txt you should run "rosdep what_needs $dep" and include it only, if the result is empty (besides the package to delete). Otherwise system dependencies for ros packages, that are not installed as a .deb, might be deleted.
dornhege gravatar image dornhege  ( 2011-06-16 01:04:16 -0500 )edit
Could you please explain to me the output of "rosdep depdb <rospackage>"? I tried "rosdep depdb turtlesim" and there was a confusing list of lines with left and right angle brackets, interparsed with names of various software..that I think is required by turtlesim.
kissandra79 gravatar image kissandra79  ( 2011-06-16 21:49:12 -0500 )edit
You will have lines like that: "<<<< zziplib -> libzzip-0-13 libzzip-dev >>>>". Ignore the brackets and everything on the left-hand side of "->". The debian package names here are libzzip-0-13 and libzzip-dev.
Martin Günther gravatar image Martin Günther  ( 2011-06-16 22:31:18 -0500 )edit
So you mean to say that all the 'debian package' names that appear after "->" are the ones required by 'turtlesim' which are not installed on my computer?
kissandra79 gravatar image kissandra79  ( 2011-06-17 02:48:49 -0500 )edit
No, its all required packages. rosdep satisfy (without -i) will give you those which are not installed.
dornhege gravatar image dornhege  ( 2011-06-17 10:39:15 -0500 )edit
Thank you very much - )
kissandra79 gravatar image kissandra79  ( 2011-06-17 21:45:41 -0500 )edit

answered 2011-06-16 14:53:57 -0500

tfoote gravatar image

updated 2011-06-16 14:54:08 -0500

rosdep satisfy -i PACKAGENAME will list everything required by a package. You can then apt-get remove whatever you want. However be careful, other things may depend on some subset of that tree. The best way to do what you want is likey to look in the dpkg logs of when you installed.

edit flag offensive delete link more

answered 2011-06-15 10:35:10 -0500

kwc gravatar image

updated 2011-06-16 04:09:14 -0500

(scratching post, answer was incorrect, rosdep satisfy doesn't work)

edit flag offensive delete link more


Are you sure that this works? I believe that rosdep first checks for debian packages being already installed and then outputs only packages that are not installed yet.
Lorenz gravatar image Lorenz  ( 2011-06-15 20:15:31 -0500 )edit
Lorenz is right, that's exactly what rosdep does.
Martin Günther gravatar image Martin Günther  ( 2011-06-16 00:12:38 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-06-15 09:41:19 -0500

Seen: 1,399 times

Last updated: Jun 16 '11