Raspberry Pi

How to Fix Repository Update Error on Raspberry Pi

Updating the Raspberry Pi source list is one of the tasks you often do on your Raspberry Pi terminal to update the packages on your Raspberry Pi system. However, sometimes you may find errors while updating the Raspberry Pi source list, which puts you in a situation where you have no other option instead of looking for a way to resolve the errors. You may find it difficult to install some packages if these types of errors occur during the update process.

If you are experiencing the same errors while updating the Raspberry Pi source list, you should need to delete the repositories that are causing the error. This article will show you how to remove the repositories on your Raspberry Pi system to overcome the source list update error.

How to Fix Repository Update Error on Raspberry Pi

Here, we will show you how you can easily remove the repository from your Raspberry Pi system that is causing problems during the source list update process. You can apply this simple method if you are experiencing the same error during the update process, like the one shown below:

Sometimes, this error makes it difficult for you to install some applications on your Raspberry Pi system. Because these applications first update the Raspberry source list and if there is an error, the process will stop installing the application on your system.

The below given image shows the same type of error while installing the Pi-Apps on the Raspberry Pi system and the output clearly shows that the process fails to install the application on our Raspberry Pi system.

To fix this error, you must check the repository which is causing any error, as in our case, the Caddy repository is causing an error and we must remove this repository from the Raspberry Pi source list.

All the repositories on your Raspberry Pi system are placed in the soruces.list.d directory and to remove the repository, you must open the directory using the following command:

$ cd /etc/apt/sources.list.d

To view the content of the directory, you must apply the following command:

$ ls

After executing the ls command, you will see the repository list and to remove a repository, you should follow the below-mentioned syntax:

$ sudo rm <repository>

As soon as you remove the repository that is causing an error, you can then update the list using the following command again:

$ sudo apt update

This time you won’t face any issue while updating the source list. In case multiple repositories are causing errors, you can delete those repositories before updating the source list.

Conclusion

Updating the Raspberry Pi source list can show some errors or warnings. You can fix the error by deleting the repository from the Raspberry Pi source list by heading towards the location “/etc/apt/sources.list.d” and removing the repository using the “sudo rm” command. Ensure that the repository you delete must be the one causing the error during the update process.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.