Spotify still makes sense on a Linux desktop when you want the full app instead of a browser tab, with media keys, notifications, and offline listening for Premium accounts. You can install Spotify on Ubuntu without leaving the terminal, but the desktop app still needs a graphical session to open after the package is in place.
Spotify is not in Ubuntu’s default repositories, so the real choice is between a native package and two universal formats with different update tradeoffs. Ubuntu 26.04 and 24.04 can use the official APT package, while Ubuntu 22.04 needs the Snap or Flatpak build because Spotify now depends on libc6 >= 2.39.
Install Spotify on Ubuntu
Spotify is not available from Ubuntu’s default repositories, so sudo apt install spotify-client only works after you add Spotify’s official source on Ubuntu 26.04 or 24.04. If you are on Ubuntu 22.04, use the Snap or Flatpak method instead.
| Method | Channel | Version | Updates | Best For |
|---|---|---|---|---|
| APT (Official Repo) | Spotify for Linux | Latest stable | Manual via APT | Ubuntu 26.04 and 24.04 users who want a native package |
| Flatpak | Flathub | Latest stable | Manual via Flatpak | All supported Ubuntu LTS releases if you want sandboxing and do not mind a community package |
| Snap | Snapcraft | Latest stable | Automatic background updates | All supported Ubuntu LTS releases with a Spotify-published package |
- Use APT on Ubuntu 26.04 or 24.04 if you want the most native package-manager workflow.
- Use Snap on any supported Ubuntu LTS, especially 22.04, if you want Spotify’s own published package and automatic background updates.
- Use Flatpak on any supported Ubuntu LTS if you want a sandboxed build and do not mind using a community-maintained package.
The current APT package works on Ubuntu 26.04 and 24.04, but not on 22.04. Flatpak and Snap work on all supported Ubuntu LTS releases, and every method installs from a shell even though Spotify itself still needs a desktop session to launch.
Install Spotify from the Official APT Repository
Spotify’s APT package feels most native on Ubuntu, but it currently works only on Ubuntu 26.04 and 24.04 because the package now requires a newer libc6 than Ubuntu 22.04 ships.
Start by refreshing APT and upgrading any pending packages:
sudo apt update && sudo apt upgrade -y
These commands use
sudofor tasks that need root privileges. If your account is not in the sudoers file yet, follow the guide to add a new user to the sudoers file on Ubuntu or switch to a user that already has sudo access.
Install the download and keyring tools next. The gpg package provides the gpg --dearmor command used to convert Spotify’s ASCII-armored signing key into an APT keyring file, and the next step is a practical example of using the curl command in Linux for a repository key download.
sudo apt install curl gpg -y
Import Spotify’s signing key into its own dedicated keyring. If apt update later reports NO_PUBKEY 5384CE82BA52C83A, rerun this command.
curl -fsSL https://download.spotify.com/debian/pubkey_5384CE82BA52C83A.asc | sudo gpg --dearmor -o /usr/share/keyrings/spotify-archive-keyring.gpg
Write the repository as a DEB822 source file. This uses sudo tee because plain > redirection does not inherit root privileges, and the final > /dev/null only keeps tee from printing the file contents twice.
printf '%s\n' \
'Types: deb' \
'URIs: https://repository.spotify.com' \
'Suites: stable' \
'Components: non-free' \
'Architectures: amd64' \
'Signed-By: /usr/share/keyrings/spotify-archive-keyring.gpg' \
| sudo tee /etc/apt/sources.list.d/spotify.sources > /dev/null
Check the saved file before you refresh APT so you can catch paste mistakes early:
cat /etc/apt/sources.list.d/spotify.sources
Types: deb URIs: https://repository.spotify.com Suites: stable Components: non-free Architectures: amd64 Signed-By: /usr/share/keyrings/spotify-archive-keyring.gpg
Refresh APT and confirm that Spotify’s repository is visible before you install the package. The package name is spotify-client, but the launcher command is spotify.
If you are on Ubuntu 22.04, stop here and use the Snap or Flatpak section instead. The repository is reachable on 22.04, but spotify-client currently fails to install there because Spotify now requires a newer libc6 than Ubuntu 22.04 provides.
sudo apt update
Get:4 https://repository.spotify.com stable InRelease [3,316 B] Reading package lists... Done Building dependency tree... Done 17 packages can be upgraded. Run 'apt list --upgradable' to see them.
apt-cache policy spotify-client
spotify-client:
Installed: (none)
Candidate: 1:1.2.82.428.g0ac8be2b
Version table:
1:1.2.82.428.g0ac8be2b 500
500 https://repository.spotify.com stable/non-free amd64 Packages
Install the client once the repository check looks correct:
sudo apt install spotify-client -y
Verify that APT now shows the installed version and the package status entry:
apt-cache policy spotify-client
spotify-client:
Installed: 1:1.2.82.428.g0ac8be2b
Candidate: 1:1.2.82.428.g0ac8be2b
Version table:
*** 1:1.2.82.428.g0ac8be2b 500
500 https://repository.spotify.com stable/non-free amd64 Packages
100 /var/lib/dpkg/status
Spotify’s current Debian package recreates
/etc/apt/sources.list.d/spotify.listduring package script runs, even if you already createdspotify.sources. If a laterapt updatewarns about duplicate Spotify targets, delete the legacy.listfile and keep the DEB822 source file.
Install Spotify from Flatpak
Flatpak keeps Spotify sandboxed and works on Ubuntu 26.04, 24.04, and 22.04, which makes it the simplest fallback when the APT package will not install on 22.04.
Flatpak is not pre-installed on Ubuntu. If the
flatpakcommand is missing, first install Flatpak on Ubuntu and sign out once so desktop launchers appear normally.
Add Flathub at system scope if you have not enabled it already:
sudo flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak remotes | grep -F flathub
flathub system
Install Spotify from Flathub with its full application ID:
sudo flatpak install flathub com.spotify.Client -y
Verify the installed Flatpak afterwards. Flathub currently labels this build as a community package rather than an officially supported Spotify release.
flatpak info com.spotify.Client
Spotify - Online music streaming service
ID: com.spotify.Client
Ref: app/com.spotify.Client/x86_64/stable
Arch: x86_64
Branch: stable
Version: 1.2.82.428.g0ac8be2b
License: LicenseRef-proprietary=https://www.spotify.com/us/legal/end-user-agreement/
Origin: flathub
Installation: system
Install Spotify from Snap
Spotify’s Snap is published by Spotify and works on all supported Ubuntu LTS releases. Standard Ubuntu desktop installs already include Snap, but server and minimal images may need sudo apt install snapd first.
Install the Spotify snap with one command:
sudo snap install spotify
spotify 1.2.82.428.g0ac8be2b from Spotify** installed
Confirm that the snap is installed from the stable channel:
snap list spotify
Name Version Rev Tracking Publisher Notes spotify 1.2.82.428.g0ac8be2b 92 latest/stable spotify** -
Launch Spotify on Ubuntu
All three methods install from a terminal, but Spotify still needs a graphical desktop session to open. Use the launcher that matches your package format if you prefer starting it from a terminal.
Launch Spotify from the Terminal
Run the command that matches the package format you installed. These commands still launch the same desktop app, not a terminal-only Spotify client.
# APT
spotify
# Flatpak
flatpak run com.spotify.Client
# Snap
snap run spotify
Launch Spotify from the Applications Menu
Ubuntu also adds Spotify to the Applications overview automatically. Open Activities, search for Spotify, and launch it from there like any other desktop app.


Update or Remove Spotify on Ubuntu
Package updates and cleanup depend on the format you chose, so use the matching commands below.
Update Spotify APT Installation
APT-managed Spotify updates through the normal package manager. Use --only-upgrade if you want to refresh Spotify without upgrading unrelated packages at the same time.
sudo apt update && sudo apt install --only-upgrade spotify-client -y
If Spotify recreates /etc/apt/sources.list.d/spotify.list during an upgrade and apt update warns about duplicate targets, remove the legacy file and keep the DEB822 source:
sudo rm /etc/apt/sources.list.d/spotify.list
sudo apt update
Update Spotify Flatpak Installation
Flatpak updates the Spotify app without touching the rest of your system packages:
sudo flatpak update com.spotify.Client -y
Update Spotify Snap Installation
Snap refreshes itself automatically in the background, but you can force a manual check whenever you want:
sudo snap refresh spotify
snap "spotify" has no updates available
Remove Spotify APT Installation
Remove the package first, then let APT clear orphaned dependencies if you no longer need them. If you think you may reinstall Spotify later, you can stop after this first block and keep the repository configured.
sudo apt remove --purge spotify-client -y
sudo apt autoremove -y
Verify that the package itself is gone before you decide whether to remove the repository too:
dpkg -s spotify-client >/dev/null 2>&1 && echo installed || echo not-installed
not-installed
If you also want to stop APT from checking Spotify’s repository in future updates, remove the source files and keyring after the package is gone:
sudo rm -f /etc/apt/sources.list.d/spotify.sources /etc/apt/sources.list.d/spotify.list /usr/share/keyrings/spotify-archive-keyring.gpg
sudo apt update
After the optional repository cleanup, apt-cache policy spotify-client should no longer show a live candidate from Spotify’s repository. Depending on your APT version, that can appear as no output or an N: Unable to locate package spotify-client message.
apt-cache policy spotify-client
[no output]
Remove Spotify Flatpak Installation
Use --delete-data if you want Flatpak to remove Spotify’s sandboxed settings at the same time when they exist:
sudo flatpak remove --delete-data com.spotify.Client -y
flatpak list --app | grep -F com.spotify.Client || echo not-installed
not-installed
Remove Spotify Snap Installation
Remove the snap package with the standard Snap command:
sudo snap remove spotify
snap list | grep -F spotify || echo not-installed
not-installed
Find Leftover Spotify Data on Ubuntu
Spotify only creates per-user settings after the first launch, so package removal is usually enough if you never opened the app. If you did use Spotify and want to look for leftover home-directory data, search first and delete only the paths you recognize from the output.
The final filter is a small example of using the grep command in Linux to keep the results limited to Spotify-related paths. This command only lists matches, it does not delete anything.
find ~/.config ~/.cache ~/.local/share ~/snap ~/.var/app -maxdepth 3 2>/dev/null | grep -i spotify || echo no-local-spotify-data-found
no-local-spotify-data-found
Spotify on Ubuntu FAQ
Yes. You can add the package source and install Spotify from a remote shell or on a minimal system, but Spotify is still a desktop application. It needs an active graphical session to launch, so headless systems only make sense for package installation, not for actual playback.
Spotify’s Linux page currently publishes both the Ubuntu Snap path and the Debian or Ubuntu APT instructions. The Flathub build is community-maintained and is not officially supported by Spotify.
The current spotify-client package depends on libc6 >= 2.39. Ubuntu 22.04 ships libc6 2.35, so APT can see the package in Spotify’s repository but cannot install it. Use the Snap or Flatpak method on 22.04 instead.
Spotify’s Linux page publishes repository instructions rather than a one-off .deb download link. On Ubuntu, the supported Debian package path is the Spotify repository on 26.04 and 24.04, while 22.04 users need the Snap or Flatpak package instead.
The current spotify-client package recreates /etc/apt/sources.list.d/spotify.list during package script runs. If you already use spotify.sources, remove the legacy .list file and rerun sudo apt update. If a later Spotify upgrade brings the warning back, repeat the same cleanup.
Conclusion
Spotify is ready on Ubuntu with the package format that actually fits your release, from the official APT repo on 26.04 and 24.04 to the Spotify Snap or Flathub build on 22.04. If you also want a stronger player for local files and network streams, install VLC Media Player on Ubuntu. For trimming recordings or podcast audio, install Audacity on Ubuntu.
Formatting tips for your comment
You can use basic HTML to format your comment. Useful tags currently allowed:
<code>command</code>command<strong>bold</strong><em>italic</em><blockquote>quote</blockquote>