
I've uninstalled ROS with:
sudo apt-get purge ros-*
Then when I open terminal I get this message. I have no idea how to solve it.
P.S. Because of the error I can't install ROS again.

I've uninstalled ROS with:
sudo apt-get purge ros-*
Then when I open terminal I get this message. I have no idea how to solve it.
P.S. Because of the error I can't install ROS again.
Open ~/bashrc file (using gedit ~/bashrc command) and search for this string: /opt/ros/hydro/setup.bash. If you find if, remove the code which is using it. If no, search in the other shell initialization files. It should be somewhere.
The files that contain initialization commands when a shell is invoked are: /etc/profile, /etc/bashrc, ~/.bash_login, ~/.profile, ~/.bashrc, ~/.bash_aliases and maybe others. See Shell initialization files.
To quickly check if one of these files have something wrong inside, you can use source command. For example:
source ~/.bashrc