LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-14-2017, 05:26 AM   #1
Entropy1024
Member
 
Registered: Dec 2012
Location: UK
Distribution: Ubuntu 16 & 17
Posts: 131

Rep: Reputation: Disabled
E: Unable to parse package file The package cache file is corrupted


I have had an Ubuntu 17.04 box running for over a year and update it regularly no problem. In the last two days after running an sudo apt update I get a load of messages like the one below:

Code:
E: Unable to parse package file /var/lib/apt/lists/gb.archive.ubuntu.com_ubuntu_dists_xenial-updates_universe_binary-amd64_Packages (1)

I also get an 'Hash Sum mismatch' message and 'The package cache file is corrupted'

At the end it says 'You may want to run apt-get update to correct these problems'
I have tried an apt-get update & apt update, however I still get the same problem.

Ran an apt clean & apt remove, when I run the remove I get similar error messages. Also done a few power cycles. Still the problem persists.

Any help in resolving this would be greatly appreciated.

Many thanks
Tim

Last edited by Entropy1024; 08-14-2017 at 05:30 AM.
 
Old 08-14-2017, 05:51 AM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Tim:
I'd stop issuing destructive commands until you get this sorted out.
 
Old 08-14-2017, 08:27 PM   #3
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174
Sounds like your repo's or your Update Mgr may have became corrupted.

https://www.google.com/search?q=Unab...utf-8&oe=utf-8

https://bugs.launchpad.net/ubuntu/+bug/1307762
 
Old 08-15-2017, 06:37 AM   #4
Entropy1024
Member
 
Registered: Dec 2012
Location: UK
Distribution: Ubuntu 16 & 17
Posts: 131

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
Sounds like your repo's or your Update Mgr may have became corrupted.

https://www.google.com/search?q=Unab...utf-8&oe=utf-8

https://bugs.launchpad.net/ubuntu/+bug/1307762
Thanks for the reply. It looks like all my problem files are in /var/lib/apt/lists which, after a search, says this dir is a 'Storage area for state information for each package resource'

Is this a temp storage are before files have been installed? Wondering if it's safe to delete these files from that directory.

Cheers
Tim
 
Old 08-15-2017, 02:59 PM   #5
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174Reputation: 1174
Quote:
Originally Posted by Entropy1024 View Post
Thanks for the reply. It looks like all my problem files are in /var/lib/apt/lists which, after a search, says this dir is a 'Storage area for state information for each package resource'

Is this a temp storage are before files have been installed? Wondering if it's safe to delete these files from that directory.

Cheers
Tim
You're Welcome.

Yeah, you can remove them. No repositories will be deleted, they are configured in the config file in /etc/apt/sources.list.

https://unix.stackexchange.com/quest...r-apt-get-list

You can safely remove the contents of that directory as it is recreated when you refresh the package lists. If you remove the files, but do not run apt-get update to fetch the lists, commands like apt-cache will fail to provide information.

Code:
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update
https://askubuntu.com/questions/1799...-huge-in-12-04
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Package manager Error: The package lists or status file could not be parsed or opened Chrisbar Debian 9 01-20-2018 07:57 AM
File conflict with the old installed rpm package while installing new package sr164w Linux - Newbie 3 12-15-2011 11:43 AM
[SOLVED] apt-cache search <package> show package size? ted_chou12 Linux - Newbie 2 04-05-2011 04:49 PM
list installed package files and how to know which package a file belongs bujecas Slackware 3 01-09-2010 03:14 PM
file from install ffmpeg conflicts w/file from package fmpeg-libs: which to delete? ybalazs Linux - Software 0 10-27-2009 01:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration