13

There is a question for How to remove Sublime from Ubuntu 12.04. But I'm a bit too scared to run the commands since it only says 'Sublime' and the 12.04 version of Ubuntu is specified.

I just installed 'Sublime Text 3' by clicking on the ubuntu 64 bit and then install from 'ubuntu software center'.

I want to uninstall it but now I can't find it in my 'ubuntu software center'. I don't think it is in my history (based on the time stamps) but does anyone know what 'Sublime text 3' is called in this list (just in case)?

On this page it says to type this into the command line:

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

On this page it says to install synaptic and from there install and remove packages. Or to to delete it with:

sudo apt-get remove --purge <package-name>

On this it says that if I installed it through 'ubuntu software center' or through running:

sudo dpkg -i sublime-text_build-3047_amd64.deb

Then I should remove it by running:

sudo dpkg -r sublime-text 

Which method should I use to make sure it is completely deleted from ubuntu 14.04? (The first instructions make me a bit scared that it is installed all over the place.)

Kriss
  • 287

6 Answers6

17
  1. Search for Software Center in the Dash.

    enter image description here

  2. In the Software Center search for sublime, then click on "Sublime Text".

    enter image description here

  3. Click on "Remove" then enter your password and click "Authenticate".

    enter image description here

pomsky
  • 68,507
Itachi Sama
  • 324
  • 2
  • 10
  • I recommend editing this to add captions in words explaining the steps illustrated in the screenshots. – Eliah Kagan Aug 17 '14 at 06:55
  • 1
    Despite the lack of captions, I still can't understand why so much downvoting. The answer is not well written, but it's at least correct. – Andrea Lazzarotto Aug 17 '14 at 12:43
  • 1
    now that is a real answer... – Mateo Aug 17 '14 at 13:23
  • @AndreaLazzarotto maybe other people did what I did i.e. went to sofwtare center and searched for Sublime under the 'installed' tab. For some reason you cannot find sublime there... This is why I started looking around for other solutions when all I would have had to do was to search for Sublime in the 'All software' tab. – Kriss Aug 18 '14 at 03:59
11

How did you install it?

  • If you installed it from a package (downloading a .deb, adding a PPA and using apt-get install ..., or searching the Software Centre) then the approaches using apt-get remove, dpkg -r, Synaptic or the Software Centre will all do the same thing.

  • If you downloaded an archive, extracted it somewhere and then manually created launchers, use the command line approach that has you delete those things.

If you did something else then you need to ignore all the given advice and work out the opposite of your taken approach.

FWIW, what you're describing sounds like you just need to run:

sudo apt-get remove sublime-text
Oli
  • 293,335
6
sudo apt-get remove sublime-text-installer

This command will completely remove the utility program from ubuntu. My recommendation is to this command.

  • 1
    But it does not remove sublime settings – maq Jul 29 '15 at 23:04
  • I guess this command will just remove the installer. Following line is printed when you execute above command: "After this operation, 26.6 kB disk space will be freed." -- 26.6kB ?? – Kapil Jituri Mar 25 '16 at 07:01
  • @KapilJituri: That's because the installer itself is only that small. The package manager doesn't know that the package removal will also trigger the removal of a bunch of (much larger) indirectly installed files by the package’s custom pre-removal script. – David Foerster Mar 17 '18 at 23:03
6

All methods, except for the first one, will effectively remove Sublime, granted you provide the correct package name.

When you installed Sublime, you downloaded a Debian Package, which the Software Center proceeded to install. Software Center tends to be very poor handling these packages, so I recommend you not using it to find your installed package, instead use dpkg and grep to find the package name:

dpkg -l \*sublime\*

It will show you any package with the name "sublime", then you can use any of the methods you listed to remove it.

The first will remove a manually compiled/installed Sublime, which didn't use the APT/DPKG system, so I wouldn't recommend it unless you actually employed this method.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
Braiam
  • 67,791
  • 32
  • 179
  • 269
1

I think, officially, there are two ways to install sublime. One is thorough the Ubuntu software center and the other is downloading the package from the website itself. If you're not sure which one you've used, first run this command:

sudo snap list

If there is a sublime-text entry there, you can be sure that you've used the software center. it's worth to mention that it is also possible to install sublime using sudo snap install sublime-text. Using this command to install sublime will also add an entry in the snap list. You can use command:

sudo snap remove sublime-text

to remove sublime-text from your computer.

If you've installed it directly from the website by issuing wget command (if I'm not mistaken sublime website uses wget to download the package) then you have to use:

sudo apt-get remove sublime-text

to remove sublime.

I had a funny issue myself. I had used both methods to install sublime so there were two sublimes available for me which was very annoying. I used both commands mentioned above and successfully removed sublime completely. If there are other ways of installing sublime (which I'm not aware of) I think the purge command sudo apt-get remove --purge <package-name> as you and friends mentioned above is the most reliable one. using rm command will manually delete sublime's files and folders which is like using shift + delete to remove it's folders. although that might be a working solution, but there is a chance that some configuration files (equivalent of 'registry' entries in Windows) of sublime might remain in the system and that might cause some problems (I think that one of the issues can be like the system won't notice the deletion of sublime and might try to open some files by sublime if sublime was the default app for some formats, but it's not there anymore.), and hence, reinstalling sublime might be a big problem. So, I recommend remove using snap or apt.

It might also be worthy to mention: I recommend even installing the app using terminal:

sudo snap install sublime-text

this way you can monitor the progress with much more specific details and hence won't encounter a corrupt installation and as a result a buggy sublime.

1

First of all install Synaptic package manager using:

sudo apt-get install synaptic

Then, choose mark for removal for sublime-text installer and then, remove it.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
Bishal
  • 11
  • This does not answer the question, OP asked what the best removal technique is, also the already stated they know about synaptic, please explain how this answers the question. – Mark Kirby Jan 06 '16 at 15:20