Ubuntu

How to Fix “404 Not Found” Error with “apt-get update” on Old Ubuntu

Sometimes while updating the packages list on the old Ubuntu system, the users may experience “404 Not found” error. This type of error creates an unexpected situation and may fail to update the system repository. If you are the one experiencing this type of error, refer to this article’s guidelines for help.

Fix “404 Not Found” Error with “apt-get update” on Old Ubuntu

The “404 Not Found” error occurs when you can run “apt update” or “apt-get update” command on the old Ubuntu terminal.

sudo apt-get update

This type of error occurs because the PPA repository you added in the Ubuntu repository list isn’t compatible and as a result it fails to update on your system.

To fix the “404 Not Found” error, then there are two simple methods which can be done on:

Method 1: GUI Method

To resolve the “404 Not Found” using the GUI method, go to the Ubuntu Application Menu, find, and open Software & Updates.

Then click onto the Other Software tab, and you will find the list of installed PPA repositories:

From here, you have to remove the ppa repository which is showing “404 Not Found”.

To remove the PPA repository, uncheck the repository you don’t want to remove leaving behind only the repository that is causing the error and then click on the Remove button:

Note: Above screenshot is for demonstration, do not remove the main repositories.

After performing the above steps correctly now when you will run the apt-get update command, the error wouldn’t be there any more:

sudo apt-get update

Method 2: Command line Method

If you do not want to leave the terminal and want to fix “404 Not Found” using command line, you can use this method where you only have to run the below-written command along with the name of ppa repository which is displaying error:

sudo add-apt-repository --remove ppa:<ppa_repository name>

For example:

sudo add-apt-repository --remove ppa:jonathonf/nimlang

Then to verify, that the “404 Not Found” has been fixed successfully again run the apt-get update command:

sudo apt-get update

In the output, you can see that the error has been fixed successfully.

Conclusion

Whenever a new PPA repository is installed on an old Ubuntu, it might not be compatible with the system and the users will experience “404 Not Found” while updating the repository. To fix this “404 Not Found”, the users have to remove that erroneous PPA repository from the system by GUI or command line terminal. After that, they can successfully update the old Ubuntu repository with the update command.

About the author

Zahra Zamir

An Electronics graduate who loves to learn and share the knowledge, my passion for my field has helped me grasp complex electronics concepts and now I am here to share them with others.