ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

Dependency removal

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

kissandra79 gravatar image

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

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
5

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

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

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

aptitude

... 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

Comments

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 -0600 )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 -0600 )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 -0600 )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 -0600 )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 -0600 )edit
Thank you very much - )
kissandra79 gravatar image kissandra79  ( 2011-06-17 21:45:41 -0600 )edit
1

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

tfoote gravatar image

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

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
0

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

kwc gravatar image

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

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

edit flag offensive delete link more

Comments

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 -0600 )edit
Lorenz is right, that's exactly what rosdep does.
Martin Günther gravatar image Martin Günther  ( 2011-06-16 00:12:38 -0600 )edit

Question Tools

Stats

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

Seen: 1,868 times

Last updated: Jun 16 '11