sodcalculator

10 Tech How-To

Install Spotify on Ubuntu Linux: Step-by-Step

Guide 10-36320 · Updated · Step by step

To install Spotify on Ubuntu Linux, the simplest and most reliable method is to add Spotify’s official APT repository and install the desktop client via the command line. This guide walks you through that process, along with alternative methods like Snap and Flatpak, so you can choose the approach that fits your system.

Why Use the Official Repository?

Spotify provides a native Linux client that is updated through the same package manager Ubuntu uses for system updates. Installing from the official APT repository means you get automatic updates whenever you run sudo apt update && sudo apt upgrade. This is the method recommended by Spotify for Debian-based distributions like Ubuntu, and it avoids the delays and compatibility quirks that can come with third-party packages.

Prerequisites

Before you start, make sure your system is up to date and that you have curl or wget installed (they are usually present by default). You also need sudo privileges to add the repository and install the package. Open a terminal with Ctrl+Alt+T to begin.

Method 1: Install via APT (Official Repository)

This is the standard method and works on all currently supported Ubuntu versions (20.04 and newer). Run the following commands one by one:

  1. Add Spotify’s GPG key:
    curl -sS https://download.spotify.com/debian/pubkey_6224F9941A8AA6D1.gpg | sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/spotify.gpg
  2. Add the repository to your sources list:
    echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
  3. Update your package lists:
    sudo apt update
  4. Install Spotify:
    sudo apt install spotify-client

After installation, you can launch Spotify from the application menu or by typing spotify in the terminal. The client will update automatically with your regular system updates.

Method 2: Install via Snap

Ubuntu includes Snap support out of the box, and the Spotify snap is maintained by the Snapcraft community. This method is simpler but the snap version may lag behind the APT version in updates.

  1. Open a terminal.
  2. Run: sudo snap install spotify
  3. Launch Spotify from the application menu.

Snap packages are sandboxed, which can occasionally cause issues with system tray icons or file access, but for most users it works fine. If you prefer to avoid Snap (for example, on a system where you have disabled snapd), use the APT method instead.

Method 3: Install via Flatpak

Flatpak is another universal packaging system, popular on distributions like Fedora. If you have Flatpak installed and enabled on Ubuntu, you can install Spotify from Flathub:

  1. Add the Flathub repository if you haven’t already:
    flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
  2. Install Spotify:
    flatpak install flathub com.spotify.Client
  3. Run it with: flatpak run com.spotify.Client

Flatpak gives you a consistent environment and is a good choice if you use multiple distributions. However, it requires more disk space and may have slightly slower startup times compared to the native APT package.

Which Method Should You Choose?

For most Ubuntu users, the APT method is the best balance of simplicity, speed, and update reliability. Choose Snap if you want a one-command install and don’t mind occasional delays in updates. Choose Flatpak if you already use Flatpak for other applications and prefer to keep everything in one format.

Here is a quick comparison:

  • APT: Fast, native, auto-updates with system, requires a few manual steps.
  • Snap: One command, sandboxed, may have slower updates.
  • Flatpak: Cross-distro, sandboxed, requires Flatpak setup.

Common Problems and Fixes

If you encounter issues after installation, here are the most frequent ones and how to solve them:

  • Spotify won’t launch: Try running spotify from the terminal to see error messages. Often this is due to missing libraries; run sudo apt --fix-broken install to repair dependencies.
  • No sound: Check your system sound settings and ensure the correct output device is selected. Spotify uses PulseAudio or PipeWire; restarting the sound service with systemctl --user restart pipewire (or pulseaudio) can help.
  • System tray icon missing: This is common with Snap and Flatpak versions. For APT, install an extension like gnome-shell-extension-appindicator if you use GNOME.
  • Repository key error: If you get a GPG error, re-add the key using the command in Method 1. Make sure you have the correct key URL.
  • Old version after update: If the APT version is outdated, run sudo apt update again and check if the repository is correctly listed in /etc/apt/sources.list.d/spotify.list.

Frequently Asked Questions

Is Spotify available as a .deb file? No, Spotify does not provide a direct .deb download. The official repository is the supported way to install on Debian/Ubuntu.

Does Spotify work on Ubuntu 24.04 LTS? Yes, the APT repository and Snap both work on 24.04. The client is a 64-bit application, so 32-bit systems are not supported.

Can I install Spotify without sudo? No, both APT and Snap require administrative privileges. If you don’t have sudo, you could use a portable version, but that is not officially supported.

How do I uninstall Spotify? For APT: sudo apt remove spotify-client. For Snap: sudo snap remove spotify. For Flatpak: flatpak uninstall com.spotify.Client. You may also want to remove the repository file if you used APT.

Why does Spotify use so much memory? The desktop client is built with web technologies, which inherently use more RAM than native apps. This is normal; you can reduce usage by closing unused windows or using the web player in a browser.

Is there a difference between the Linux client and the Windows/Mac version? The core features are the same, but the Linux client sometimes receives updates later. Some features like lyrics or podcast video may appear later on Linux.

Alternatives to the Desktop Client

If the desktop client doesn’t meet your needs, you have a few options:

  • Spotify Web Player: Works in any browser, no installation needed. Ideal for occasional use or if you have limited disk space.
  • Third-party clients: Apps like Spot or ncspot are terminal-based clients that use less memory. However, they are not official and may break when Spotify changes its API.
  • Android app via Anbox/Waydroid: Not recommended for daily use, but possible if you need the mobile interface.

For most people, the official APT client is the most stable and feature-complete choice.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →