How toOperating SystemsUbuntu

How to Fix Ubuntu Update Error

Who hasn’t run into a problem while updating Ubuntu? In Ubuntu and other Linux distributions built on Ubuntu update errors are frequent and many.

The solutions to a few typical Ubuntu update issues are shown below.

This article is a part of the Ubuntu beginner series, which describes Ubuntu’s functionality so a new user can better grasp it.

If you encounter issues while updating your system, do not become alarmed. The mistakes are frequent, and the fix is simple. 

You’ll discover how to correct those typical update issues.

Ubuntu Update Error

  1. Problem With Merge List
  2. Failed to download repository information
  3. Hash Sum mismatch
  4. Failed to fetch with error 404 not found
  5. GPG error: The following signatures couldn’t be verified
  6. Failed to download package files error
  7. BADSIG error
  8. Could not get lock /var/cache/apt/archives/lock
  9.  Partial upgrade error

How to Fix Ubuntu Update Error

Problem With Merge List

There may be an “issue with MergeList” error when you run an update in the terminal, as shown below:

E:Encountered a section with no Package: header,
E:Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise_universe_binary-i386_Packages,
E:The package lists or status file could not be parsed or opened.’

The file in the /var/lib/apt/lists directory became corrupt for unknown reasons. 

To start over, you can run the update once more after deleting every file in this directory. 

One by one, use the following commands:

sudo rm -r /var/lib/apt/lists/* Sudo apt-get clean && Sudo apt-get update

Your issue ought to be resolved.

Failed to download repository information

Many Ubuntu desktop users use the graphical software updater application to update their operating systems.

When updates for your system become available, you receive a notification, and you only need to click one button to begin downloading and installing the updates.

Well, that is generally what takes place.

The download of repository data was unsuccessful. Look into your internet connection.

It’s a strange error because it still advises you to verify your internet connection even though it’s probably fine.

It’s not an error in and of itself, therefore. It’s not likely related to the internet connection. But other than this false error notice, there is no meaningful information.

It’s time to don your detective hat and apply your brain power if you notice this error and your internet connection is functioning normally (as Hercule Poirot would say).

Here, you’ll need to use the command line. To open the terminal on Ubuntu, press the shortcut key combination Ctrl+Alt+T. Use this command in the place:

sudo apt update

Allow the command to expire. Watch the final three to four lines of its output. You will then know the actual cause of the Sudo apt-get update failing.

Hash Sum mismatch

The repair is the same as the one in the preceding issue if you encounterBADSIG an error, which is also a signature-related Ubuntu update issue, appears as follows: a Hash Sum mismatch error.

W:Failed to fetch bzip2:/var/lib/apt/lists/partial/in.archive.ubuntu.com_ubuntu_dists_oneiric_restricted_binary-i386_Packages Hash Sum mismatch,
W:Failed to fetch bzip2:/var/lib/apt/lists/partial/in.archive.ubuntu.com_ubuntu_dists_oneiric_multiverse_binary-i386_Packages Hash Sum mismatch,
E:Some index files failed to download. They have been ignored, or old ones used instead

A mismatched metadata cache between the server and your machine may be the source of the problem. To resolve it, issue the following commands:

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

Failed to fetch with error 404 not found

A 404 not found error is sent if you attempt to add a PPA repository that is not accessible for your current Ubuntu version.

W: Failed to fetch http://ppa.launchpad.net/venerix/pkg/ubuntu/dists/raring/main/binary-i386/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

You added a PPA in the hopes of installing a programme, but your version of Ubuntu does not support it, thus you are left with the update error. For this reason, you should confirm in advance whether a PPA is accessible for your particular Ubuntu version. In the comprehensive PPA guide, I covered how to check the PPA's availability.

In any case, the solution is to delete the problematic PPA from your list of repositories. From the error message, take note of the PPA name.

GPG error: The following signatures couldn’t be verified

The following GPG error may also appear after adding a PPA: When you attempt to run an update in a terminal, the following signatures cannot be verified:

W: GPG error: http://repo.mate-desktop.org saucy InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 68980A0EA10B4DE8

The following GPG error may also appear after adding a PPA: 

When you attempt to run an update in a terminal, the following signatures cannot be verified:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 68980A0EA10B4DE8

Run the update once more when the key has been added, and everything should be great.

Failed to download package files error

A newer version of the software is available in this instance, but not all of the mirrors have received it. It is simple to solve if you are not utilizing a mirror by switching the software sources to the Main server. For more information on the failed-to-download package error, please read this article.

Change the download server to the Main server by going to Software & Updates and doing so there.

BADSIG error

BADSIG error, which is also a signature-related Ubuntu update issue, appears as follows:

W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://extras.ubuntu.com precise Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key
W: GPG error: http://ppa.launchpad.net precise Release:
The following signatures were invalid: BADSIG 4C1CBC1B69B0E2F4 Launchpad PPA for Jonathan French W: Failed to fetch http://extras.ubuntu.com/ubuntu/dists/precise/Release

All of the repositories have GPG signatures, but for some reason your system rejects them. Update the signature keys, please. Regenerating the apt packages list (with their signature keys) is the simplest method to do this, and it should produce the right key.

Use each of the following commands in the terminal one at a time:

cd /var/lib/apt 
sudo mv lists oldlist 
sudo mkdir -p lists/partial 
sudo apt-get clean 
sudo apt-get update

Could not get lock /var/cache/apt/archives/lock

When APT is utilized by another software, this error occurs. Consider that you are attempting to execute apt at the terminal while installing anything through the Ubuntu Software Center.

E: Could not get lock /var/cache/apt/archives/lock – open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

Check to see if any other programs are using apt. Any software that deals with installing and uninstalling apps, such as Software Center, Software Updater, Software & Updates, or a command-running terminal, could be the culprit.

Close any further similar programs you can. Wait for a process to finish if one is currently underway.

If you are unable to discover any such programs, execute the command below to end all related processes that are currently running:

sudo killall apt apt-get

Partial upgrade error

This partial upgrade problem may be thrown by updating the terminal:

Not all updates can be installed
Run a partial upgrade, to install as many updates as possible

To resolve this issue, enter the following command in the terminal:

sudo apt-get install -f

How do I fix a failed Ubuntu update?

The computer restarted, launching Ubuntu in recovery mode: As the PC boots up, keep the Shift key depressed. Select recovery mode after selecting the advanced settings in the GRUB boot menu that opens. Enable networking first in the recovery menu that occurs before selecting the choice to launch a root shell.

Can you upgrade Ubuntu without reinstalling it?

One of Ubuntu’s best features is the ability to upgrade from one version to the next. Without having to reinstall and set up your system, you gain access to the most recent software, including new security updates and all the enhanced technology that comes with a new version.

How do I reinstall Ubuntu without losing data?

To reinstall Ubuntu and preserve personal files, choose the Reinstall Ubuntu option on the Installation type screen. To format the hard drive and install a brand-new Ubuntu instance on the device, select the Erase Ubuntu and reinstall option. To begin the installation, click the Install Now button.

Does upgrading Ubuntu delete files?

In the current system, all of your data and the vast majority of application settings stay unchanged. However, it is always advised to create a data backup on an external disc. You cannot downgrade your Ubuntu version after deciding to upgrade. You must completely reinstall Ubuntu to return to version 20.04 or 21.10.

Conclusion

On an earlier version of Ubuntu, try running the command: cd /var/lib/apt/lists/partial/in.archive.ubuntu.com ubuntu dists oneiric restricted binary-i386 Packages Hash Sum mismatch to fix any signature-related problems.

A BADSIG problem that is likewise a signature-related Ubuntu update issue happened during the signature verification for some PPAAs as well. The GPG signatures are present in every repository, but for some reason your system rejects them. The correct key should be generated by regenerating the apt packages list.

Always be updated with computer tips, mobile tips, How to fix, tech reviews, and tech news on Rowdytech, or subscribe to the YouTube channel.

Related Articles

5 1 vote
Article Rating
Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Back to top button
1
0
Would love your thoughts, please comment.x
()
x