Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed Sublime following steps from this Site. But I read on here that it is wrong way to install. Now my question is how do i remove it.

share|improve this question
What does: sudo sed -i 's/sublime\.desktop/gedit.desktop/g' /usr/share/applications/defaults.list do? – user169474 Mar 18 '14 at 8:05
up vote 14 down vote accepted
sudo rm -r /opt/Sublime\ Text\ 2
sudo rm /usr/bin/sublime
sudo rm /usr/share/applications/sublime.desktop
sudo sed -i 's/sublime\.desktop/gedit.desktop/g' /usr/share/applications/defaults.list
share|improve this answer
sudo sed -i 's/sublime\.desktop/gedit.desktop/g' /usr/share/applications/defaults.list should do that. – Oli Aug 2 '13 at 8:37
@Oli right, update, thanks :) – rpadovani Aug 2 '13 at 8:42
First of all try: sudo dpkg -r sublime-text – Jiemurat Oct 23 '13 at 6:41

Those steps are not wrong, but it would be easier (and sometimes saver as pointed out by your link) to do it using a ppa. So if you still want to remove it then you will have to 'reverse' step 2, 3, 4 and 5 using the following commands.

Step 2 reverse sudo rm -R /opt/Sublime\ Text\ 2

Step 3 reverse sudo rm /usr/bin/sublime

Step 4 reverse sudo rm /usr/share/applications/sublime.desktop

Step 5 reverse sudo gedit /usr/share/applications/defaults.list and replace all occurrences of sublime.desktop with gedit.desktop

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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