How to Install Spotify Client in Ubuntu 24.04

Last updated: April 2, 2024 — Leave a comment

This tutorial shows how to install the popular Spotify music app in Ubuntu Linux though Snap, Deb, or Flatpak packages.

Spotify supports for Linux officially through Snap package which runs in sandbox environment, and Deb package that’s native in Debian and Ubuntu. For choice, there’s also a community maintained Flatpak package, which also runs in sandbox environment. All of them is available for only x86_64 (Intel/AMD CPUs) platform so far.

Spotify for Linux packages:

  • Snap package, runs in sandbox and receives updates automatically.
  • Deb package, the classic package format runs natively in Debian and Ubuntu.
  • Flatpak package, unofficial community maintained package, runs in sandbox and works in most Linux desktop.


Option 1: Install Spotify in Ubuntu via Snap package

Snap is the easiest way to get the most recent app package installed in Ubuntu, since it’s officially supported by Canonical, the company behind Ubuntu. And, Spotify Snap can be installed in all current Ubuntu releases!

Simply launch App Center (or Ubuntu Software for 22.04/20.04), then search and install Spotify snap package:

For choice, user can press Ctrl+Alt+T on keyboard to open terminal and run command below instead to install the package:

snap install spotify

The snap package installs updates automatically. If you want manually check updates for it, then use command:

snap refresh spotify

Option 2: Install Spotify Deb package

For those who hate running app in sandbox environment, Spotify also provides an official apt repository contains .deb package for Debian/Ubuntu users.

There’s an official setup guide which is however OUTDATED at the moment of writing due to Debian/Ubuntu policy change.

Install GPG Key

To make your system trust the packages from the Spotify repository, you have to first download and install its GPG key file.

First, press Ctrl+Alt+T on keyboard to open up a terminal window. When it opens, paste the command below into terminal and hit run:

wget -qO - https://download.spotify.com/debian/pubkey_6224F9941A8AA6D1.gpg | gpg --dearmor | sudo tee /etc/apt/keyrings/spotify.gpg

This command will first use wget tool to download the gpg key file, dearmor it so unreadable (see the screenshot below), and finally install it to /etc/apt/keyrings directory.

After that, you may run ls /etc/apt/keyrings and verify if there’s the spotify.gpg file listed in that directory.

Add Spotify repository

After setup the key, then run command to create & edit the sources file:

sudo nano /etc/apt/sources.list.d/spotify.sources

Here I use nano command line text editor that works in most desktops. You can replace it with gnome-text-editor for default GNOME Desktop, or gedit for Ubuntu 22.04/20.04 with GNOME, mousepad for XFCE, or pluma for MATE Desktop.

When file opens, paste follow lines, then press Ctrl+S to save, Ctrl+X to exit.

Types: deb
URIs: http://repository.spotify.com
Suites: stable
Components: non-free
Signed-By: /etc/apt/keyrings/spotify.gpg

Refresh & install Spotify Deb package

Now, refresh your system package cache by running command:

sudo apt update

In the terminal output, it should include a line says something “Get: x http://repository.spotify.com table …

Finally, install the .deb package by apt command line package manager:

sudo apt install spotify-client

To check update for the package, either use Software Updater or re-run the last command again and again.

Option 3: Install Spotify via Flatpak package

Linux Mint users may prefer the Flatpak package, since Snap is blocked out-of-the-box and the Flatpak package can be installed directly from Software Manager app.

Ubuntu users can install the Spotify Flatpak package by running the 2 commands below one by one:

  • First, open terminal (Ctrl+Alt+T) and run command to install the Flatpak daemon:
    sudo apt install flatpak

  • Then, install the music app as Flatpak package by using command:
    flatpak install https://dl.flathub.org/repo/appstream/com.spotify.Client.flatpakref

After installation, search for and launch the music app from start menu or ‘Show Apps’ screen depends on your desktop environment.

If app icon is not visible, either try log out and back in to apply PATH environment for Flatpak, or run flatpak run com.spotify.Client command to start it from command line.

To check updates for the Spotify Flatpak package, use command:

flatpak update com.spotify.Client

Uninstall Spotify

Depends on which package you installed, open terminal (Ctrl+Alt+T) and run corresponding command to uninstall the app.

For the Snap package, use either App Center (or Ubuntu Software), or run command to uninstall:

snap remove --purge spotify

For the Deb package, uninstall it by running command:

sudo apt remove --autoremove spotify-client

Also remove the Spotify source repository by deleting both sources and key files:

sudo rm /etc/apt/keyrings/spotify.gpg /etc/apt/sources.list.d/spotify.sources

Finally, run sudo apt update to refresh system package cache.

For the Flatpak package, use command to uninstall:

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

And run flatpak uninstall --unused to remove useless run-time libraries that can free up some disk spaces.

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

No Comments

Be the first to start the conversation.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*