Spotify is a popular music streaming service available on various platforms, including Linux. By default, Ubuntu and Debian do not include Spotify in their package repositories. To install Spotify, you must add its official repository and key to the system.
Spotify uses a repository that allows you to download its latest version and handle updates through the package manager. This method ensures the installation is secure, verified by a GPG key provided by Spotify. You will need to add this repository manually, as it is not available by default on Ubuntu or Debian systems.
The repository provides access to the latest version of the Spotify client for Ubuntu and Debian. Once the repository is added, installing and updating Spotify is done through APT, like any other package. This allows users to manage Spotify updates efficiently as part of their system updates.
$ sudo apt update Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] Fetched 114 kB in 1s (224 kB/s) Reading package lists... Done
$ sudo apt install curl Reading package lists... Done Building dependency tree Reading state information... Done curl is already the newest version (7.68.0-1ubuntu2.6). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ curl -sS https://download.spotify.com/debian/pubkey.gpg | sudo gpg --dearmor -o /usr/share/keyrings/spotify-archive-keyring.gpg
The GPG key ensures the authenticity and integrity of the packages downloaded from the Spotify repository. It must be installed before adding the repository.
$ echo "deb [signed-by=/usr/share/keyrings/spotify-archive-keyring.gpg] http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list deb [signed-by=/usr/share/keyrings/spotify-archive-keyring.gpg] http://repository.spotify.com stable non-free
$ sudo apt update Hit:1 http://repository.spotify.com stable InRelease Reading package lists... Done
$ sudo apt install spotify-client Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: spotify-client 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 105 MB of archives. After this operation, 280 MB of additional disk space will be used. Do you want to continue? [Y/n] y ...
Once installed, you can launch Spotify from the application menu or by typing `spotify` in the terminal.