8

i have a big error warning in my Ubuntu 14 because of Spotify.

This the error :

E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/repository.spotify.com_dists_stable_non-free_i18n_Translation-en%5fUS
E: The package lists or status file could not be parsed or opened.
E: _cache->open() failed, please report.

I want to uninstall this program, how to do it ?

Braiam
  • 67,791
  • 32
  • 179
  • 269
Carlos Rojas
  • 89
  • 1
  • 1
  • 4
  • 1
    Spotify seems to have fixed the cause of that error message. No reason any longer to make any changes. (There was never a reason to uninstall the program.) – Gunnar Hjalmarsson Jul 04 '14 at 14:56

5 Answers5

26

Use this command for uninstall spotify-client :

sudo apt-get purge spotify-client
teal33t
  • 977
  • not working : Reading package lists... Error! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/repository.spotify.com_dists_stable_non-free_i18n_Translation-en%5fUS E: The package lists or status file could not be parsed or opened. – Carlos Rojas Jul 03 '14 at 23:39
  • First remove the merge list : sudo rm /var/lib/apt/lists/* -vf – teal33t Jul 03 '14 at 23:41
  • Next : sudo apt-get update – teal33t Jul 03 '14 at 23:41
9

This won't be solved by uninstalling Spotify, only by removing the Spotify apt repository from your list of apt repositories.

Editing /etc/apt/sources.list or possibly some file in /etc/apt/source.list.d/ like fhuertas suggests will work.

If you don't want to edit files, you can start Software & Updates, go to the tab Other Software and uncheck http://repository.spotify.com stable non-free

This is both a problem with the Spotify repository and apt itself.

  • The repository is clearly broken. If you look at the file mentioned being broken, you see it contains HTML.
  • It is bad of apt to die like this, preventing even critical security upgrades from installing, because of a bad third party repository is broken.

I work at Spotify. We suck! We will fix.

jooon
  • 271
  • 1
  • 6
1

These terminal commands should solve your problem:

First remove the Merge List by opening a terminal (Press Ctrl+Alt+T to launch) and run this command:

sudo rm /var/lib/apt/lists/* -vf

Next, generate a new one by running a simple update:

sudo apt-get update

Now you should be able to run

sudo apt-get remove --purge spotify-client

Charles Green
  • 21,339
  • sorry not working – Carlos Rojas Jul 04 '14 at 01:07
  • Reading package lists... Error! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/repository.spotify.com_dists_stable_non-free_i18n_Translation-en%5fUS E: The package lists or status file could not be parsed or opened. hardov@hardov-VPCY216FX:~$ sudo apt-get remove --purge spotify-client Reading package lists... Error! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/repository.spotify.com_dists_stable_non-free_i18n_Translation-en%5fUS E: The package lists or status file could not be parsed or opened. – Carlos Rojas Jul 04 '14 at 01:14
1

If the problem persists after Charles Green's solution, You must remove the repository from the places that you have set it.

Im my case, I had the repository en the file: /etc/apt/sources.list and I have removed it adding the # in the line symbol before the line deb http://repository.spotify.com stable non-free

 # deb http://repository.spotify.com stable non-free

The repository can be in the /etc/apt/source.list.d/ directory, you must search for a spotify file and remove it

After then update and upgrade the with apt-get tools

fhuertas
  • 141
  • 8
1

I had the same issue and I found the solution at the Spotify forum. Credits to webrunner1981.

Here are the steps:

  1. Go to software sources (search software & updates) and find the spotify line
  2. Modify the url to http://repository-origin.spotify.com stable non-free for (source code) as well. Add the -origin in the url.
  3. In terminal then run the following commands:

    sudo rm /var/lib/apt/lists/* -vf

    and now you can perform the update and everything should be working.

    sudo apt-get update

This should fix everything, so you don't have to uninstall. Good luck.

Lento
  • 11
  • 4