Sublime Forum

Helpful info. for Debian/Ubuntu/Mint apt-get repository users

#1

apt-get users who have added the SublimeHQ dev channel may wish to hear the details about a question which I posted on the AskUbuntu StackExchange site: Apt sources list with both Dev and Stable entries

It is fine to add both the dev and stable channels to your /etc/apt/sources.list.d/sublime-text.list file. Just use sudo to edit the file and add both, i.e.

deb https://download.sublimetext.com/ apt/dev/
deb https://download.sublimetext.com/ apt/stable/

Don’t forget to update the sources list after making any changes.

sudo apt-get update

From now on apt-get will look at both channels and install the release with the highest version number, be it the latest dev or stable. When Sublime Text notifies you of a new release, just quit Sublime and enter the commands below.

sudo apt-get update
sudo apt-get install sublime-text

Furthermore: if SublimeHQ add the latest stable release to the dev channel feed as well as to the stable channel feed, so that both channels are offering the same version, there will be no problem; apt-get will simply choose one of the channels arbitrarily and install the new version.

HTH.

One thing I’d like to know is:

If a dev build breaks something I can’t live without, and I want to downgrade to a specific earlier version, how can I do that with apt-get? Thanks.

EDIT - Answering my own question:

You can downgrade using apt-get but only to the versions available in the repositories. You can list the currently available repository versions using apt-cache, e.g.

apt-cache show sublime-text
apt-cache show sublime-text | grep -i version

On my system the bottom of the above commands gives me the following (my notes in [] brackets):

Version: 3134    [SublimeHQ dev channel]
Version: 3126    [SublimeHQ stable channel]
Version: 3103    [Linux Mint repository, hadn't known about that]

Clearly if downgrading using apt-get I’d have little choice but to use 3126. In which case the following command would downgrade:

sudo apt-get install sublime-text=3126

But what happens if I want to downgrade to a different version, e.g. the most recent but one dev version?

No problem, just download the .deb file that you want, substitute VVVV for the version number.

https://download.sublimetext.com/sublime-text_build-VVVV_amd64.deb
e.g.
https://download.sublimetext.com/sublime-text_build-3133_amd64.deb

Then install it using dpkg -i, e.g.

sudo dpkg -i sublime-text_build-VVVV_amd64.deb

It is important to note that it is absolutely fine to mix apt-get install and dpkg -i. In fact apt-get uses dpkg to perform installations. apt-get is just a smart wrapper for dpkg - it looks in the repositories for the most recent .deb file version (or the version the user specified), downloads the appropriate .deb file, and then installs it using dpkg. The only difference is that apt-get will also examine the .deb file for its list of dependencies and then install them as well, dpkg does not do that. BUT in this case that does not matter because Sublime Text .deb files do not have any dependencies. Credit: StackExchange posts here and here.

I hope this helps clarify issues arising from SublimeHQ’s switch from .deb file downloads to the use of a repository for Debian/Ubuntu/Mint users. I’ve certainly learnt a lot about how the whole process fits together.

10 Likes

Dev Build 3133
Won't start in Ubuntu 14.04
#2

I know this is an older post, but in case this is seen first, check out my post here for instructions on how to always prefer the official version of the sublime-text update (regardless of weird versioning schemes, outdated versions, etc.):

1 Like