This guide walks you through installing the official Spotify desktop client on Ubuntu and Linux Mint. You’ll use the terminal and Spotify’s own repository, which gives you automatic updates whenever a new version is released. No third-party scripts or manual downloads are needed.
What You’ll Need
- A computer running Ubuntu (20.04 or newer) or Linux Mint (20.x or newer)
- An active internet connection
- Terminal access (you’ll be pasting a few commands)
- A free Spotify account (free tier works, but you’ll see ads)
Step-by-Step
- Open a terminal window. Press
Ctrl+Alt+Ton your keyboard, or search for “Terminal” in your application menu. - Add Spotify’s GPG key. This key verifies that the packages you install are genuinely from Spotify. Run this command:
curl -sS https://download.spotify.com/debian/pubkey_6224F9941A8AA6D1.gpg | sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/spotify.gpg
Ifcurlis not installed, first runsudo apt install curland then retry. - Add the Spotify repository. This tells your system where to find Spotify packages. Run:
echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list - Update your package list. Run
sudo apt updateso your system knows about the new repository. - Install Spotify. Run
sudo apt install spotify-client. When prompted, typeYand press Enter. - Launch Spotify. Once the installation finishes, you can find Spotify in your application menu, or run
spotifyfrom the terminal. Log in with your account and enjoy.
Common Mistakes
- Forgetting to update after adding the repo. If you skip
sudo apt update, the install step will fail with “Unable to locate package spotify-client.” - Using the wrong repository URL. Some older guides use
repository.spotify.com(without the trailing slash) or an HTTP URL. The correct one ishttp://repository.spotify.com(with the slash, as shown above). - Not installing curl. If curl is missing, the GPG key command fails. Install curl first with
sudo apt install curl. - Mixing up the key URL. The key URL must match exactly:
https://download.spotify.com/debian/pubkey_6224F9941A8AA6D1.gpg. A typo here will cause a “key not found” error.
Tips
- Use the terminal for updates. Spotify updates automatically when you run
sudo apt upgrade, which you should do regularly. - Enable hardware acceleration (optional). If you have a compatible GPU, you can edit the Spotify desktop shortcut to add
--enable-features=VaapiVideoDecoderto the command line. This can reduce CPU usage during video playback. To do this, edit the file~/.local/share/applications/spotify.desktop(create it if it doesn’t exist) and add the flag to theExec=line. - Keep your system clean. If you ever want to remove Spotify, use
sudo apt remove spotify-clientand then delete the repo file withsudo rm /etc/apt/sources.list.d/spotify.list. - Use the Snap version (alternative). If the repository method gives you trouble, you can also install the Snap version with
sudo snap install spotify. It’s sandboxed and updates automatically, but some users report slower startup.
Troubleshooting
- “Unable to locate package spotify-client” – This usually means the repository wasn’t added correctly or you didn’t run
sudo apt update. Check that the file/etc/apt/sources.list.d/spotify.listcontains exactlydeb http://repository.spotify.com stable non-freeand then runsudo apt updateagain. - GPG key error during update – If you see “The following signatures couldn’t be verified because the public key is not available,” re-add the key with the command in Step 2, then run
sudo apt updateagain. - Spotify won’t launch – Try running
spotifyfrom the terminal to see error messages. Often this is due to missing libraries. Runsudo apt --fix-broken installto fix any dependency issues, then try again. - Sound issues – If Spotify plays but you hear no sound, check your system volume and ensure the correct output device is selected in your system sound settings. Spotify uses the system’s sound server (PulseAudio or PipeWire), so if other apps play sound, Spotify should too.
- Login loop – If you’re stuck in a login loop, try clearing Spotify’s cache:
rm -rf ~/.cache/spotifyand then restart Spotify. If that doesn’t work, check your network connection—some corporate networks block Spotify’s login servers.
Frequently Asked Questions
Is Spotify available in the Ubuntu Software Center?
Yes, but the version there is a Snap package. The repository method in this guide gives you a .deb package, which some users prefer for faster startup and better integration.
Will Spotify update automatically?
Yes, once installed via the repository, Spotify updates along with your other system packages when you run sudo apt upgrade. You don’t need to do anything special.
Can I install Spotify on Linux Mint 19 or older?
Yes, the repository method works on older versions, but you may need to manually install the curl and gpg tools if they’re missing. However, Spotify may drop support for older systems over time, so it’s best to use a recent version of Mint.
How do I uninstall Spotify completely?
Run sudo apt remove spotify-client to remove the app, then sudo rm /etc/apt/sources.list.d/spotify.list to remove the repository, and finally sudo apt update.
Spotify uses a lot of RAM. Is there a fix?
Spotify is a Chromium-based app, so it’s memory-hungry. You can try disabling hardware acceleration in Spotify’s settings (Edit > Preferences > Show Advanced Settings > Compatibility), but it may not help much. Closing unused tabs and restarting the app regularly can help.
Can I use the command line to control Spotify?
Yes, you can use tools like playerctl to control playback from the terminal. Install it with sudo apt install playerctl, then use commands like playerctl play-pause to control Spotify.
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
- Access Your Computer From Anywhere: Step-by-Step
- How to Get More Disk Space on Mac: 12 Fixes
- Wii Browser Games With a USB or Bluetooth Controller
- Delete Focus on iPhone: Quick Steps
- Open System Configuration in Windows 10: 7 Ways
- How to Connect VPN: Step-by-Step Setup Guide