How do I fix a "Failed to download package files" error?
Press Alt+F2 and type software-properties-gtk
.
Change the download location to Main Server or another server close to the country you live in and try to sudo apt-get update
again.
Run the following commands (saves a backup of the old lists and creates a new lists folder) and the BADSIG error does not occur:
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get update
There's a Package Manager Troubleshooting Procedure that usually solves this sort of problem. Perform steps 1-4 of that procedure. (Step 1, which is sometimes enough, is what Bruno Pereira has posted--in better detail--in this answer. If step 1 isn't enough, continue with the other steps.)
If that doesn't solve the problem, then please select all the text in the Terminal (Edit
> Select All
), copy it to the clipboard (Edit
> Copy
), and edit your question to include it (you'll want to make it a blockquote so that the formatting doesn't get messed up). This will then provide highly useful information for solving the problem.
It seems that single enabled repository failing to update will cause this message. In my case, it was dl.winehq.org/wine-builds/ubuntu/bionic - I unchecked and no longer get error messages.