How to Install Spotify on Ubuntu Linux

Spotify provides access to millions of songs, podcasts, and audiobooks through a native Linux desktop client. Whether you want to stream your favorite playlists while working, discover new music through personalized recommendations, or download content for offline listening during commutes, the Spotify desktop app integrates seamlessly with Ubuntu’s application menu and notification system. By the end of this guide, you will have Spotify installed and running on your Ubuntu system using your preferred installation method.

Choose Your Spotify Installation Method

Generally, Ubuntu offers multiple ways to install the Spotify desktop client, each with different trade-offs for update frequency, isolation, and package management preferences.

MethodChannelVersionUpdatesBest For
APT (Official Repo)Spotify RepositoryLatest stableAutomatic via apt upgradeMost users who prefer native package management
FlatpakFlathubLatest stableAutomatic via flatpak updateUsers who want sandboxed apps or run multiple distros
SnapSnapcraftLatest stableAutomatic background updatesUsers who prefer Ubuntu’s default universal package format

For most users, the APT method is recommended because it integrates with Ubuntu’s native package manager, uses minimal disk space, and receives updates through the standard system upgrade process.

The Spotify repository uses a universal package format that works on all current Ubuntu releases, including LTS versions and interim releases. Commands shown in this guide work identically regardless of your specific Ubuntu version.

Install Spotify with APT

Primarily, the APT method uses Spotify’s official Debian repository, which provides automatic updates through your system’s package manager.

Update Ubuntu System Packages

First, ensure your system packages are current to avoid dependency conflicts during installation:

sudo apt update && sudo apt upgrade

Install Required Dependencies

Next, install the packages needed for downloading and verifying the Spotify repository:

sudo apt install curl gnupg

Import Spotify GPG Key

First, download and install Spotify’s GPG signing key to verify package authenticity:

curl -fsSL https://download.spotify.com/debian/pubkey_5384CE82BA52C83A.asc | gpg --dearmor | sudo tee /usr/share/keyrings/spotify-archive-keyring.gpg > /dev/null

Add Spotify Repository

Next, configure the official Spotify repository using the modern DEB822 format:

cat <<EOF | sudo tee /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
EOF

Install Spotify Client

After adding the source, refresh the package cache to include the newly added repository, then install Spotify:

sudo apt update

Before proceeding, verify that APT recognizes the Spotify repository:

apt-cache policy spotify-client

For instance, the expected output confirming the repository is configured:

spotify-client:
  Installed: (none)
  Candidate: 1:1.2.x.xxx
  Version table:
     1:1.2.x.xxx 500
        500 https://repository.spotify.com stable/non-free amd64 Packages

Now install the Spotify client:

sudo apt install spotify-client

Finally, verify the installation completed successfully by checking the installed version:

apt-cache policy spotify-client

As an example, the expected output confirming Spotify is installed:

spotify-client:
  Installed: 1:1.2.77.xxx.xxxxxxxx
  Candidate: 1:1.2.77.xxx.xxxxxxxx
  Version table:
 *** 1:1.2.77.xxx.xxxxxxxx 500
        500 https://repository.spotify.com stable/non-free amd64 Packages

Install Spotify with Flatpak

Alternatively, Flatpak provides sandboxed application installation, keeping Spotify isolated from your system files while still integrating with your desktop environment.

Flatpak is not pre-installed on Ubuntu. If you have not set it up yet, install it with sudo apt install flatpak and restart your session before continuing. For detailed setup including the Flathub repository, follow our Flatpak installation guide for Ubuntu.

Enable Flathub Repository

Since Flathub is the primary source for Flatpak applications, add it if not already configured. The --system flag installs the repository for all users on the machine:

sudo flatpak remote-add --if-not-exists --system flathub https://flathub.org/repo/flathub.flatpakrepo

Install Spotify from Flathub

With the repository enabled, install the Spotify client from Flathub. The -y flag automatically confirms the installation prompt:

sudo flatpak install --system flathub com.spotify.Client -y

Finally, verify the installation completed successfully:

flatpak info --system com.spotify.Client

As an example, the expected output confirming the installation:

Spotify - Online music streaming service

          ID: com.spotify.Client
         Ref: app/com.spotify.Client/x86_64/stable
        Arch: x86_64
      Branch: stable
      Origin: flathub
     Version: 1.2.x.xxx

Install Spotify with Snap

As another option, Snap is Ubuntu’s native universal package format, pre-installed on all standard Ubuntu installations. This method provides automatic background updates and application sandboxing.

Consequently, to install Spotify using Snap, run:

sudo snap install spotify

Similarly, the expected output confirming successful installation:

spotify 1.2.x.xxx from Spotify✓ installed

Verify the installation by listing installed snaps:

snap list | grep spotify

For instance, the expected output showing the installed snap:

spotify  1.2.x.xxx  xx  latest/stable  spotify✓  -

Launch Spotify

After installation, you can launch Spotify through the terminal or graphical application menu.

Launch from Terminal

Specifically, the launch command depends on which installation method you used:

APT installation:

spotify

Flatpak installation:

flatpak run com.spotify.Client

Snap installation:

snap run spotify

Launch from Applications Menu

Additionally, Spotify integrates with Ubuntu’s GNOME desktop automatically. Click the Activities button in the top-left corner, type “Spotify” in the search bar, and click the Spotify icon to launch the application.

Remove Spotify

However, if you no longer need Spotify, use the removal method that matches your installation.

Remove APT Installation

To remove the APT version, uninstall the Spotify package and clean up orphaned dependencies:

sudo apt remove --purge spotify-client
sudo apt autoremove

Furthermore, if you do not plan to reinstall Spotify, remove the repository and GPG key:

sudo rm /etc/apt/sources.list.d/spotify.sources
sudo rm /usr/share/keyrings/spotify-archive-keyring.gpg

After removing the repository files, refresh the package index and verify removal:

sudo apt update
apt-cache policy spotify-client

As an example, the expected output confirming the repository is no longer available:

spotify-client:
  Installed: (none)
  Candidate: (none)
  Version table:

Remove Flatpak Installation

In contrast, for the Flatpak method, uninstall Spotify and remove its application data:

sudo flatpak uninstall --system --delete-data com.spotify.Client

Optionally, remove unused Flatpak runtimes to free disk space:

sudo flatpak uninstall --system --unused

Remove Snap Installation

Lastly, to remove the Spotify snap package, run:

sudo snap remove spotify

Remove User Data (All Methods)

Be aware that Spotify stores settings and cached data in your home directory. Therefore, remove these folders for a complete cleanup:

The following commands permanently delete your Spotify settings, cached music, and offline downloads. If you have playlists or preferences you want to preserve, export them through the Spotify app before proceeding.

APT or Snap installation:

rm -rf ~/.config/spotify ~/.cache/spotify

Flatpak installation:

rm -rf ~/.var/app/com.spotify.Client

Conclusion

To summarize, you now have Spotify installed on Ubuntu using either the official APT repository, Flatpak from Flathub, or Snap. Notably, the APT method provides native integration with Ubuntu’s package management, while Flatpak and Snap offer sandboxed alternatives with automatic updates. Finally, if you encounter playback issues, check that your audio drivers are correctly configured and that no firewall rules block Spotify’s streaming connections.

Leave a Comment