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.

  • What does: sudo sed -i 's/sublime\.desktop/gedit.desktop/g' /usr/share/applications/defaults.list do?
    – user169474
    Commented Mar 18, 2014 at 8:05

2 Answers 2

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
  • 1
    sudo sed -i 's/sublime\.desktop/gedit.desktop/g' /usr/share/applications/defaults.list should do that.
    – Oli
    Commented Aug 2, 2013 at 8:37
  • 2
    First of all try: sudo dpkg -r sublime-text
    – Jiemurat
    Commented Oct 23, 2013 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .