After installing a ros package, when I did rosdep check , it has displayed some missing system dependencies that were not taken care of, during apt-get install . So, I installed them using rosdep install. However when I want to remove the ros package ,

sudo apt-get purge ros-*

sudo apt-get purge python-ros*

sudo apt-get autoremove

running the above three commands seem to be removing only the ros dependencies and not the system dependencies. How do I remove the system dependencies as well in this case? Thank you.

PS: I am trying to install only a single ros package on Ubuntu 16.04 ARM.


The short answer is that you cannot do it easily.

Apt keeps track of which packages you specified to install (manual) and which packages were merely included (auto).


$ sudo apt install foo bar                 // Manual
The following additional packages will be installed:
  baz, libfoo1, libfoo2, libbar            // Auto

An admin ordered the system to install 'foo' and 'bar'. They will remain installed until an admin orders the system to uninstall them. They will never be autoremoved.

If doesn't matter if 'bar' is actually a dependency of 'foo'. The human has spoken, and both are set to manual.

It is the admin's responsibility to keep track of manually-selected dependencies.

If your /var/log/apt logs go back far enough, those logs will tell you exactly which packages were added. That can be a great help.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.