How do I update Sublime Text 2?

How about from PPA? Much easier to install/update I think:

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

SublimeText does not store its settings and plugins (at least those you downloaded using PackageControl) in the same directory as the editor itself (/usr/lib/sublime-text-2 in your case) - the settings are stored in /home/(yourusername)/.config/sublime-text-2/, so they won't be overridden when you install a new version.

But, just in case, you can make a backup copy of your current install before unpacking. Something like this would do:

sudo mv /usr/lib/sublime-text-2 /usr/lib/sublime-text-2.old
sudo tar jxf "/var/cache/sublime-text-2/Sublime Text 2 Build 2181.tar.bz2" /usr/lib

Just to note: installing stuff from tarballs into /usr is very wrong, if you must use system directories use /opt at least. Otherwise SublimeText runs just fine from a location in your home directory. Here I wrote a bit more on the matter: https://askubuntu.com/a/172753/14564


To upgrade sub­lime text 3, do the following

sudo apt-get update
sudo apt-get install --only-upgrade sublime-text-installer