How to install Sublime Text 2 instead of 3 from webupd8team PPA?

All tutorials on installing ST2 on Ubuntu describe 2 ways:

  1. Manual way of downloading the tar from the official website, extracting it, moving it to /opt/, creating a symlink and start menu entry etc.

  2. Automatic way, consisting of these commands:

Commands:

sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text

The problem is that this actually installs ST3 and not ST2. Why I think so? When I start it, the title of the program is only Sublime Text and not Sublime Text 2. Help -> About Sublime Text shows this:

enter image description here

So my question is - have they removed ST2 from the webupd8team/sublime-text-2 repo and replaced it with ST3? Is there a way to install ST2 using apt-get?


Solution 1:

There are 2 Sublime Text PPAs and both install the correct version. You've probably used the Sublime Text 3 PPA but posted the instructions for Sublime Text 2 in your question. I just tried the Sublime Text 2 PPA and it correctly installs Sublime Text 2:

enter image description here

So the instructions for installing Sublime Text 2 you posted in your question are correct as long as you didn't add other PPAs:

sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text

More information on the Sublime Text 2 PPA.

Or, if you want to install Sublime Text 3:

sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer

More information on the Sublime Text 3 PPA.

Note that you can't install both Sublime Text 2 and 3 using these PPAs - when you install one Sublime Text version, the other one is automatically removed.