Remove Spotify advertising, in Ubuntu 17.10 in a simple way

about spotify remove ads

In the next article we are going to take a look at Spotify. On several occasions this fantastic platform has already been talked about in this blog. If you are a linxuero and you use Spotify in its free mode, you are one of those who should swallow the advertising yes or yes. In case you want to contribute to the music platform by clicking on its ads, this article is not for you. If, on the other hand, you think that you have already contributed enough you can hide that advertising that is sometimes so annoying.

I have to give all the credits on how to remove advertising to the YouTube channel Alternative to Windows, which is the site where I found it. You can access this channel from the following link. The commands that will be seen next, I am testing them at this precise moment on my Ubuntu 17.10 and it works perfectly. Visual advertising is hidden and the sound has not yet jumped. And there are already 50 minutes of uninterrupted songs.

Spotify can be found in the main mobile and desktop operating systems in the world, although within the latter its relations with the Gnu / Linux world have not always been good.

Before moving on, evidently we will have to have the desktop client installed on our computer. In case someone has not followed the link to the colleague's article in which he tells us how to install Spotify in Ubuntu, here are the commands so that you only have to copy and paste to the console.

Install Spotify on Ubuntu 17.10

To start with, let's add signing keys from Spotify repository. With this, the downloaded packages can be verified. We open the terminal (Ctrl + Alt + T) and write in it:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0DF731E45CE24F27EEEB1450EFDC8610341D9410

As with many third-party programs, to install Spotify you need to add a PPA. That is why we are going to add the Spotify repository to our list below. In the same terminal we write:

echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list

Now we only need to update the list of available packages and install Spotify. In the same terminal we are going to write the following script:

sudo apt update && sudo apt install spotify-client

Now we can launch our desktop client. We will only have to search for it in our system.

Remove Ads from Spotify

spotify host file remove ads

Well, once we have this desktop client installed in our Ubuntu, we are going to block and thus eliminate the advertising of our Spotify client. To achieve this, we will have to open a terminal (Ctrl + Alt + T) and paste the following into it path to host file.

sudo nano /etc/hosts

The hosts file on a computer is used by the operating system to save the correspondence between Internet domains and IP addresses. This is one of the different methods that the operating system uses to resolve domain names. In the past when there were no DNS servers that resolved domains, the hosts file was the only one in charge of doing it.

At the end of the file that will be opened, below the last line, we will only have to paste these lines and save the changes.

0.0.0.0 pubads.g.doubleclick.net
0.0.0.0 securepubads.g.doubleclick.net

I was adding the lines two by two.

0.0.0.0 gads.pubmatic.com
0.0.0.0 ads.pubmatic.com

But in the end the only thing that worked with the results I was looking for was adding them all.

0.0.0.0 spclient.wg.spotify.com

And that's it, we've just removed our client's advertising. From now on, every time we open our Spotify with a free account we will no longer see or hear the advertising. Although I like everything in these things, I suppose it is a matter of time before free users have to swallow the advertising again. By this I can guarantee that at the time of writing this article, the instructions given here are effective in Ubuntu 17.10. Within X days or months, I no longer have it so clear.

ad-free spotify

If you want to continue contributing to the platform that gives you streaming music for free, from time to time, you will only have to delete what we have included in the host file and go back to viewing advertising mode.

Uninstall Spotify

We can remove this desktop client from our operating system in a simple way. We will only have to open the terminal (Ctrl + Alt + T) and write in it:

sudo apt remove spotify-client

If we want to remove the repository from our list, we can do so from the "Software sources" option.


14 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Charles Nuno Rocha said

    Works.

    1.    Mary Tolca said

      If you also want to remove spotify premium, as it happened to me, this website will help me https://quitar.wiki/quitar-spotify-premium/

      Greetings.

  2.   Carlos UcMay said

    Another "simple" way is paying, I would not like the day to come when they stop developing the application for Ubuntu

    1.    jordany said

      How wonderful that this trick also works on Windows and Android

  3.   allucardster said

    it works

  4.   Hours said

    It seems like another way to encourage piracy, I ask you a question. If you made an application and your money depended on that application, would you like people not to donate, skip your ads? They generate a debt, and not only to the programmer of the application (or the firm that develops it), but also to the musicians who compose the songs that they listen to so much. For those who do not know, spotify depends on advertising to pay musicians, for every few minutes that people listen to their music they are paid, it's that simple, and they depend on those advertisements to have a model of music stream «free ». And for things like these, the free model is not making them profitable as it should. People don't think about what's behind them, they see a publication on how to get advertisements to spotify and they say okay, but good vibes! But do not think about how it affects. In the long run they end up hurting everyone. Anyway, it's just another form of piracy, and I'm surprised that they publish this kind of thing on this blog, I thought it was a higher level. Being a fan of free software and programming, it is a shame that I publish this, since it should understand the point of view of the programmer of the app, and even makes one doubt that he understands open source and its philosophy.

    1.    Damian Amoedo said

      You are right (only partly). What you say about how Spotify makes money to pay musicians is totally true, although the methods it uses are more than debatable in my opinion. But I have to tell you that it seems to me that everyone is free to try things. And if one of those things that you can try is the use of the hosts files of your operating system, then I think that everyone should be able to do it since it can be useful for many other things.

      This article is just an example of one of the things you can do with this file (but you still have plenty of practical examples of things), at no time are you encouraged to "hack" anything or stop clicking in the ads that appear on Spotify. I guess it all depends on what each one wants to see. You see "piracy" and I only see knowledge about the operating system and its things. Salu2.

  5.   sebastian said

    For those who say this encourages piracy. Currently in Chile the only form of payment that it accepts is with a credit card, which the banks do not give me because I am a student (it does not allow me to pay with debit, webpay or PayPal that I can recharge with my debit account), that is why I turn to this article. The day spotify accepts other means of payment I will pay it

  6.   Alejandro said

    Thank you, it helped me a lot, I remove the advertising.

  7.   jordany said

    I wouldn't mind the hype if Spotify invested in AI to offer me ads with music I like, but it's disgusting to hear ads with music that I hate or offer me liquor as a Latin American stereotype.

    Meanwhile I use and "Modify" the program to suit my needs that I use Ubuntu for that.

    Also Windows and Android use the same system in their application, I will test on the apple soon.

  8.   falc said

    Hello, thanks for your contribution. I have a problem. Some songs are blocked from the playlists when I apply the changes you indicated. Any idea why and solution?
    Total thanks.

  9.   lycnobia said

    The same thing happens to me as Falc, songs or entire discs are blocked 🙁
    If someone finds out how to fix it share it. Otherwise unblocked songs do sound ad-free.

    1.    Sea_ said

      They are blocked by cache themes, you must delete the hidden files. ~ lock

      1.    falc said

        And how I do it?
        Thank you.