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

Uninstalling ROS and installing it back

asked 2011-04-06 00:43:26 -0600

Sudarshan gravatar image


I'm running Ubuntu 10.04 (64-bit). I had previously installed ros-cturtle but didn't use it much. Since a new version of ROS is available, I wanted to upgrade my version. Unsure on how to go about doing it, I did something stupid and deleted the ros directory on my machine, along with all references to ros I could find with locate (in the hope I could do a fresh install of diamondback). However, after this I installed diamondback and found that roscd is still looking for cturtle:

roscd:cd:4: no such file or directory: /opt/ros/cturtle/ros

I am not sure if roscd is a "binary" that I could find and delete or where its getting this information from. I use Z-shell and I have removed references of ROS_ROOT from my .zshrc. I removed diamondback using sudo apt-get remove ros-diamondback-ros as I want to build and install from source. But before that, I want to get rid of this problem, so any help is appreciated.

Thanks, S.

edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted

answered 2011-04-06 03:50:46 -0600

kwc gravatar image

updated 2011-04-06 03:51:01 -0600

It sounds like you still have some references to the old ROS in your .zshrc or somewhere. The roscd command is defined in roszsh.

1) Look for references to setup.zsh that are still cturtle related

2) Look for lines like:

source $ROS_ROOT/tools/rosbash/roszsh

3) Look for definitions of $ROS_ROOT that are still pointing at cturtle.

edit flag offensive delete link more


It's weired. I restarted my machine and roscd no longer exist. I was able to install diamondback without any problems.
Sudarshan gravatar image Sudarshan  ( 2011-04-06 23:57:11 -0600 )edit

answered 2011-04-06 05:32:29 -0600

Wim gravatar image

You don't have to remove the old version of ROS to start using a new one. Multiple versions can happily be installed next to each other. E.g. the cturtle version is installed in /opt/ros/cturtle, and the diamondback version is installed in /opt/ros/diamondback. You can switch between versions by setting your environment:

source /opt/ros/diamondback/setup.bash

If you do want to remove a version of ROS, you should use the apt tools instead of manually removing files:

sudo apt-get remove ros-cturtle-ros

edit flag offensive delete link more

answered 2016-11-07 06:36:40 -0600

Amine_Frei gravatar image

try this peeps sudo apt-get remove --auto-remove ros-kinetic-*

edit flag offensive delete link more

answered 2015-04-27 12:27:44 -0600

Atilay Mayadag gravatar image

updated 2015-04-27 12:28:08 -0600

I want to same thing that to remove ros-indigo and reinstall again i used

sudo apt-get remove ros-indigo-ros

but the in terminal i try


command and ros run again , how can I completely delete ros indigo and reinstall again it ?

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2011-04-06 00:43:26 -0600

Seen: 9,881 times

Last updated: Nov 07 '16