Categories: Ubuntu

How to Install Spotify Client in Ubuntu 24.04

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.
Sponsored

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 …

Sponsored

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:

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.

The post How to Install Spotify Client in Ubuntu 24.04 appeared first on Osgrove.

Ubuntu Server Admin

Recent Posts

Web Engineering: Hack Week 2024

At Canonical, the work of our teams is strongly embedded in the open source principles…

12 hours ago

Ubuntu Weekly Newsletter Issue 873

Welcome to the Ubuntu Weekly Newsletter, Issue 873 for the week of December 29, 2024…

2 days ago

How to resolve WiFi Issues on Ubuntu 24.04

Have WiFi troubles on your Ubuntu 24.04 system? Don’t worry, you’re not alone. WiFi problems…

2 days ago

Remembering and thanking Steve Langasek

The following is a post from Mark Shuttleworth on the Ubuntu Discourse instance. For more…

2 days ago

How to Change Your Prompt in Bash Shell in Ubuntu

I don’t like my prompt, i want to change it. it has my username and…

3 days ago

The Silent Guardian: Why Bundler Checksums Are a Game-Changer for Your Applications

Introduction: A Fragile Trust The Ruby ecosystem relies heavily on RubyGems.org as the central platform…

4 days ago