"the package cache file is corrupted" error [duplicate]

Solution 1:

Try this fixes:

  1. Open the file /etc/apt/sources.list:

    sudo nano /etc/apt/sources.list
    
  2. Comment out either line 52 or 54 with a # at the start of your choice.

  3. Now run sudo apt update

Now do (WARNING: copy and paste, don't leave out the *):

sudo rm -rf /var/lib/apt/lists/*
sudo apt update