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

How I completely remove all ros from my system?

asked 2013-03-05 13:23:40 -0600

unais gravatar image

Hello,

The ros path and different versions of ros couses problem in my system. I want to completely uninstall ros from my system. I want to completely remove all things related to ros from my system. How can I done this?

Then wan't to install a fresh ROS

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
39

answered 2013-03-05 13:56:43 -0600

If you're running Ubuntu, and installed ROS with apt-get, the first step would be

sudo apt-get remove ros-*

If you've created a workspace, you'll have to also remove that... and if you added the setup scripts to your .bashrc, you'd have to remove them too.

If you've installed from source then it will be more complicated.

edit flag offensive delete link more

Comments

hello, Actually I had both indigo and jade installed in my system. I tried to remove jade by sudo apt-get remove ros-jade but it shows unable to locate package ros-jade. I want to remove only jade

newbieros gravatar image newbieros  ( 2015-10-07 04:08:46 -0600 )edit
1

Hai, I am completely new to ros and linux. Can you pls tell me how to remove added scripts from .bashrc. Also I believe that removing workspace simply means removing the folder. Kindly help

skr_robo gravatar image skr_robo  ( 2016-01-12 18:42:54 -0600 )edit

@newbieros did you try $ sudo apt-get remove ros-jade-* ? You have to add the asterisk in there.

jacksonkr_ gravatar image jacksonkr_  ( 2016-03-30 17:00:37 -0600 )edit
2

@Jon what if you did install it from a source? what do you have to do to remove it?

pacifickid9 gravatar image pacifickid9  ( 2017-10-20 21:55:33 -0600 )edit

i removed ROS using the command and deleted catkin_ws manually but still when i open my terminal i see this.........

bash: /opt/ros/kinetic/setup.bash: No such file or directory bash: /home/kaustubh/catkin_ws/devel/setup.bash: No such file or directory

kaustubh@ubuntu:~$

Please help me get rid of this

Kaustubh Patil gravatar image Kaustubh Patil  ( 2020-02-18 14:24:13 -0600 )edit

@Kaustubh Patil - if you are on Ubuntu you have to remove the line from .bashrc: Edit the file ./bashrc: sudo nano ~/.bashrc

The remove the line that looks something like this: : source /opt/ros/kinetic/setup.bash

Jaapy gravatar image Jaapy  ( 2020-02-19 02:59:08 -0600 )edit
1

Note that this syntax does not work between aptversions 1.9.9 and 2.0.2: https://askubuntu.com/a/1218821

Instead, use sudo apt uninstall '?name(ros-*)'

33thou gravatar image 33thou  ( 2020-10-05 21:08:51 -0600 )edit
22

answered 2014-09-09 07:45:20 -0600

tonyParker gravatar image

updated 2014-09-09 07:54:24 -0600

Use

sudo apt-get purge ros-*

It will also remove configuration files. And then

sudo apt-get autoremove

To remove dependencies

edit flag offensive delete link more

Comments

1

Hi! Could you tell me if I should manually delete catkin_ws folder?

aidos gravatar image aidos  ( 2016-05-24 08:09:20 -0600 )edit

There is also one interesting thing occurred while the purging process: it has deleted "Krusader" file manager from my system. I am new to Ubuntu, so I don't know why this purge command has also done this.

aidos gravatar image aidos  ( 2016-05-24 08:10:59 -0600 )edit
2

The command should be sudo apt-get purge '^ros-*', to match really only things that start with ros-, otherwise it will uninstall other packages that contain the string ros, like things with microsoft in the name (this is probably also the answer to your problem, @aidos).

nh2 gravatar image nh2  ( 2016-08-06 07:34:02 -0600 )edit

aidos, you should not delete catkin_ws folder it is yours. If you want to delete only catkin_ws you can delete it separately, and create a new one.

ixtiyoruz gravatar image ixtiyoruz  ( 2020-08-12 20:15:28 -0600 )edit
5

answered 2013-03-05 14:23:39 -0600

aimc gravatar image

Hi. First thing to do is: sudo apt-get remove ros-* as Jon Stephan said before. Then, you should check your ~/.bashrc (as noted before). Check for your /opt/ directory, where a ROS folder may still exist.

Reboot. You might want to verify that ROS is completely removed by echoing ROS_PACKAGE_PATH or other variables.

edit flag offensive delete link more

Comments

1

Hi, I would like add a point here. I tried the above remove command. All the files were removed except for a folder in /etc/ros/rosdep/. This folder contains the sources list. I believe this too should be removed. Please correct me if I am wrong. thank you.

MKI gravatar image MKI  ( 2014-06-19 05:00:35 -0600 )edit

MKI do u knw how to remove it?

kaygudo gravatar image kaygudo  ( 2015-12-18 10:13:13 -0600 )edit
1

You need to do with sudo rm command.

sudo rm 20-default.list
Nebula gravatar image Nebula  ( 2018-03-15 02:44:07 -0600 )edit

sudo rm /etc/ros/rosdep/sources.list.d/20-default.list

spkadam gravatar image spkadam  ( 2020-04-13 15:39:09 -0600 )edit
3

answered 2021-08-25 07:09:30 -0600

gokulp01 gravatar image

Hello! I know its coming in quite late, but if anyone else is looking for the solution:

sudo apt-get purge --auto-remove ros-<distro_name>-desktop-full

replace <distro_name> with the distro you are currently using, in my case, melodic:

sudo apt-get purge --auto-remove ros-melodic-desktop-full
edit flag offensive delete link more

Question Tools

4 followers

Stats

Asked: 2013-03-05 13:23:40 -0600

Seen: 312,427 times

Last updated: Aug 25 '21