Sublime Text gives Ubuntu users a fast graphical editor that opens large projects quickly, keeps keyboard-driven workflows responsive, and still stays approachable for everyday file edits. If you want to install Sublime Text on Ubuntu, the official Sublime HQ APT repository is the best default because it installs the current stable build, adds the subl command-line launcher, and updates through normal APT workflows.
This guide covers Ubuntu 26.04, 24.04, and 22.04. It also explains the community Snap package, why the old Flathub package is no longer a good install path, and how to remove Sublime Text cleanly later. If you are comparing editors, Visual Studio Code fits heavier IDE-style workflows, Neovim works well for terminal-first editing, and Kate is a strong KDE-native alternative.
Install Sublime Text on Ubuntu
Several installation paths are visible for Sublime Text, but they are not equivalent. Use the official APT repository when you want the vendor-supported package and predictable desktop integration. Use Snap only when you prefer Snap packaging or need to stay inside that update model.
| Path | Source | Current Status | Best Fit |
|---|---|---|---|
| Official APT repository | Sublime HQ Linux repository | Current stable package with APT updates | Recommended for most Ubuntu desktop and workstation installs |
| Snap package | Snapcraft, maintained by Snapcrafters | Community-maintained package with classic confinement | Users who prefer Snap packaging and accept the unofficial maintainer |
| Flatpak package | Flathub listing | End-of-life package, not documented as an install method below | Avoid for new Ubuntu installs |
Sublime HQ also publishes direct Linux .deb downloads for x86-64 and ARM64 systems. Use those only when you need a one-off or offline package; the repository method below is better for normal Ubuntu installs because APT can verify the source and deliver future updates automatically.
Update Ubuntu Packages First
Refresh Ubuntu’s package index before adding the Sublime Text repository. This keeps dependency metadata current before APT checks the new source.
sudo apt update
The commands in this guide use
sudo. If your account cannot run administrative commands, configure sudo access first with the Ubuntu sudoers guide.
Install APT Prerequisites
Install the small set of packages needed to download the Sublime HQ signing key and verify HTTPS connections.
sudo apt install curl ca-certificates -y
The curl command downloads the key, while ca-certificates lets APT and curl validate HTTPS endpoints.
Add the Sublime Text Signing Key
Create the APT keyring directory, then save the Sublime HQ public key in the format used by the current upstream repository instructions.
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.sublimetext.com/sublimehq-pub.gpg | sudo tee /etc/apt/keyrings/sublimehq-pub.asc > /dev/null
The key is stored as sublimehq-pub.asc because Sublime HQ publishes it as an ASCII-armored key. No gpg --dearmor conversion is needed for this repository configuration.
Create the Sublime Text APT Source
Add the stable Sublime Text repository with a DEB822 source file. The upstream repository uses the same apt/stable/ suite across current Ubuntu releases, so this command does not need your Ubuntu codename.
printf '%s\n' \
'Types: deb' \
'URIs: https://download.sublimetext.com/' \
'Suites: apt/stable/' \
'Signed-By: /etc/apt/keyrings/sublimehq-pub.asc' \
| sudo tee /etc/apt/sources.list.d/sublime-text.sources > /dev/null
The repository currently publishes Sublime Text packages for x86-64 and arm64 systems. It also contains Sublime Merge, but this article installs the editor package only.
Install the Sublime Text APT Package
Refresh APT again so Ubuntu reads the new source, then install the sublime-text package.
sudo apt update
sudo apt install sublime-text
Confirm that the package installed successfully. The version number can change as Sublime HQ publishes new builds, but the status line should match.
dpkg -s sublime-text | grep -E '^(Status|Architecture|Version):'
Status: install ok installed Architecture: amd64 Version: 4200
On arm64 systems, the architecture line should show arm64 instead of amd64.
The APT package also installs the subl command-line launcher into /usr/bin/. Verify that the launcher is available with:
command -v subl
/usr/bin/subl
Install Sublime Text with Snap
The Snap package is a community-maintained option from Snapcrafters. It tracks the current stable Sublime Text build, but it is not the vendor repository and it requires classic confinement so the editor can open normal project files.
sudo snap install sublime-text --classic
Verify the installed Snap package with:
snap list sublime-text
Name Version Rev Tracking Publisher Notes sublime-text 4200 217 latest/stable snapcrafters* classic
Snap creates a subl launcher through /snap/bin on normal Ubuntu sessions. If that path has not refreshed in your current terminal, use the Snap app command directly.
snap run sublime-text.subl
Avoid the Deprecated Flatpak Package
Flathub still lists com.sublimetext.three, but its current metadata marks the application as no longer maintained. Because that package targets an old Sublime Text 3 build and an old Flatpak runtime, use the official APT repository or the Snap package for new Ubuntu installs.
Launch Sublime Text on Ubuntu
Open Sublime Text from the Terminal
Use subl to open the editor from a terminal after an APT install or after Snap has added its launcher path.
subl
Open a specific file by passing its path:
subl /path/to/file.txt
Open the current directory as a project with:
subl .
Open Sublime Text from the Application Menu
Desktop users can also open Sublime Text from the Ubuntu application launcher. Search for Sublime Text, then select the application icon.


Install Editor Packages After Launch
After the editor opens, install editor extensions from inside Sublime Text rather than through APT or Snap. Package Control is managed from the Command Palette or the Tools menu, so it is not a separate Ubuntu package.
Update Sublime Text on Ubuntu
Update the Official APT Package
APT repository installs update through Ubuntu’s package manager. To update only Sublime Text, refresh package metadata and run a single-package upgrade.
sudo apt update
sudo apt install --only-upgrade sublime-text
Update the Snap Package
Snap packages normally refresh automatically. To request an immediate refresh for Sublime Text, run:
sudo snap refresh sublime-text
Troubleshoot Sublime Text on Ubuntu
Fix Unable to Locate Package sublime-text
The sublime-text package does not come from Ubuntu’s default repositories. If APT reports that it cannot locate the package, confirm that the Sublime Text source exists and that APT has read it.
apt-cache policy sublime-text
A working setup should show a candidate version from https://download.sublimetext.com/. If no candidate appears, repeat the signing-key and source-file steps above, then refresh APT again.
sudo apt update
Avoid Duplicate Sublime Text APT Sources
Older versions of this guide used Extrepo to enable the same Sublime HQ repository. Do not keep both an Extrepo Sublime source and the manual sublime-text.sources file enabled at the same time, because duplicate sources can create confusing APT warnings.
ls /etc/apt/sources.list.d | grep -i sublime
If you switched to the manual source in this guide and still see an older Extrepo file, remove the Extrepo source file and refresh APT.
sudo rm /etc/apt/sources.list.d/extrepo_sublime_stable.sources
sudo apt update
Remove Sublime Text from Ubuntu
Remove the Official APT Install
Remove the editor package first.
sudo apt remove sublime-text
If you also want to remove the Sublime HQ repository from APT, delete the source file and signing key, then refresh package metadata.
sudo rm /etc/apt/sources.list.d/sublime-text.sources
sudo rm /etc/apt/keyrings/sublimehq-pub.asc
sudo apt update
Before running broad cleanup commands such as apt autoremove, review what Ubuntu plans to remove. The Ubuntu package removal guide explains how to inspect removal candidates safely.
Confirm that the package is gone with:
dpkg -s sublime-text 2>/dev/null | grep '^Status: install ok installed' || echo "sublime-text not installed"
sublime-text not installed
Remove the Snap Install
If you installed the Snap package, remove it with --purge so Snap also removes stored package data for that snap revision.
sudo snap remove --purge sublime-text
Verify that Snap no longer lists the package.
snap list sublime-text 2>/dev/null || echo "sublime-text snap not installed"
sublime-text snap not installed
Remove Sublime Text User Data
The next commands permanently delete Sublime Text settings, installed packages, session data, caches, and license information from your user account. Back up these directories first if you want to keep your configuration.
Remove current Sublime Text 4 user data with:
rm -rf ~/.config/sublime-text ~/.cache/sublime-text
If you previously used Sublime Text 3, remove the legacy configuration directory only after confirming you no longer need it.
rm -rf ~/.config/sublime-text-3
Conclusion
Sublime Text works cleanly on Ubuntu through the official Sublime HQ APT repository, with the community Snap package available when that packaging model fits your system better. After installation, the subl launcher makes it easy to open files and project directories from a terminal, while APT or Snap handles future updates through the method you selected.


Formatting tips for your comment
You can use basic HTML to format your comment. Useful tags currently allowed in published comments:
<code>command</code>command<strong>bold</strong><em>italic</em><blockquote>quote</blockquote>