June 19, 2024

Troubleshoot Ubuntu: Repository does not have a Release File


Troubleshoot Ubuntu: Repository does not have a Release File

Repository does not have a Release File

Explore More; How to Create an SSH Account on Ubuntu

The occurrence of the “Repository does not have a Release file ” error signifies a predicament where the package manager is unable to locate the package information of the repository. This particular error has the potential to impede the seamless installation or updating of software on your esteemed Ubuntu system.

Common causes are:

  • Typos in repository URLs.
  • Outdated repositories.
  • Missing “Release” files.
  • Verify the URL Again: Carefully check the repository URL for typos, as errors in the URL are a common cause of this issue.
  • Check Compatibility: Ensure the repository is compatible with your Ubuntu version. Outdated repositories might not have compatible packages.
  • Remove Incompatible Repositories: If a repository is incompatible or unnecessary, delete its entry from your list of sources.
  • Examine Archive Servers: For older Ubuntu versions, check http://old-releases.ubuntu.com for archived repositories.
  • Update Package Lists: After making corrections, run sudo apt update to update the package lists and apply your changes.


Ensure the tutorial runs smoothly by setting up the following requirements: –

An Ubuntu VPS server. –

A user with sudo privileges that is not the root user.

Let’s get started!

Troubleshoot:Repository does not have a Release File

When you run the sudo apt-get update command to update your Ubuntu system and the software packages in the repositories, you usually see this error message displayed in the following format:

E: The repository ‘http://us.archive.ubuntu.com/ubuntu bionic Release‘ does not have a Release file.
N: Updating from such a repository can‘t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user

The error message includes a URL that helps you identify the problematic repository, allowing you to solve the issue quickly. Use the suggested solutions to avoid encountering the “repository does not have a release file” error.

1. Checking the Repository Compatibility with your Ubuntu version

Installing and using PPA (third-party repositories) is one of the common ways to install specific software that is not supported by the official Ubuntu repository. Sometimes, the unavailability or incompatibility of the PPA repository with the version of Ubuntu you are using leads to the display of “the repository no longer has a release file” error. To avoid this problem, before installing the PPA repository, check whether the desired PPA repository is available for your version of Ubuntu. In the following, we will explain how to check Repository Compatibility.

Each version of Ubuntu has a unique code name you can find out about the code name and your current version of Ubuntu by running the following command:

lsb_release –a

Sample Output:

No LSB modules are available.

Distributor ID:   Ubuntu

Description:        Ubuntu 20.04 LTS

Release:              20.04

Codename:        focal

After executing the previous command, take a look at the output you receive. In this output, you will find the Codename section which reveals the codename of your Ubuntu version. Once you have identified the codename of your Ubuntu version, visit the web page of the PPA repository you wish to install. On this website, navigate to the “Overview of published packages” section and filter the packages according to your Ubuntu code name. This will allow you to determine if the PPA repository supports your specific Ubuntu version. It is important to note that this step should ideally be completed before installing any PPA repositories.

However, if you have already installed a PPA without checking its compatibility with your Ubuntu version, and you encounter issues while updating or installing software, you should investigate the availability of the problematic third-party PPA repository mentioned in the error message.

Make sure it is compatible with the version of Ubuntu you are currently using.

If, after checking, you find that the PPA repository does not support the Ubuntu codename, removing the problematic PPA repository is the solution to your problem. Follow the steps below to remove the problematic PPA repository from your Ubuntu system:

Removing problematic repositories in the Ubuntu system through GUI

  • Open Software & Update tool.
  • Select the “Other Software” tab and find the repository that you have a problem with.
  • Check the check box in front of the desired PPA repository, and after highlighting it, click the “Remove” option in the screen’s bottom bar.

Removing the problematic repository in Ubuntu through Terminal

If you are used to performing tasks and settings through the Linux terminal, run the following command with sudo privileges to remove the problematic repository:

sudo addaptrepository –remove ppa:[name]

Removing the problematic PPA repository frees your system from compatibility issues. Don’t worry about losing specific software features; you can install the software you need from other sources.

2. Checking the correctness of the Repository URL in the package manager configuration

One of the reasons for receiving the “repository does not have a release file” error when updating the Ubuntu Linux system is a typo in the Repository URL in the package manager configuration. Hence, you need to check that the repository URL is correct in the package manager configuration of your Ubuntu system. To check the URL of the repository in the Ubuntu system, you need to check the configuration files containing the repository resources.

The /etc/apt/sources.list file in Ubuntu stores the configuration files for the repository URLs and also the files in the /etc/apt/sources.list.d/ directory contains a list of the initial configuration files for the repository URLs. To check the content of the Sources.list file, follow the steps below:

  • Check the content of the Sources.list file

Open the Linux terminal and use your favorite editor to access the sources.list file:

sudo nano /etc/apt/sources.list

Displaying the content of the sources.list file allows you to view the URLs of the repositories and the defined resources of the Ubuntu system.

Note: You may need Superuser (root) privileges to view and edit the content of the sources.list file. You can use the cat /etc/apt/sources.list command to display the content of the sources.list file.

  • Check Additional Sources

The /etc/apt/sources.list.d/ directory also contains files that store some repositories separately, which checking the content of this directory also has advantages. To check additional repository URLs in the content of the files listed in the /etc/apt/sources.list.d/ directory, you can use thecatcommand:

cat /etc/apt/sources.list.d/filename

Replace the filename section with the file name you want to check.

  • Search for problematic repository URLs in the content of the Sources.list file

To search for a specific word or problematic repository URL in the content of the Sources.list file, the grep command is useful and efficient.

For example, by searching for lines containing the word “repository,” you can optimize the search for the URL of your desired repository in the file’s content. To search for the phrase “repository” in the contents of the Sources.list file and the /sources.list.d directory, run the following command:

grep “repository” /etc/apt/sources.list /etc/apt/sources.list.d/*

Therefore, you can examine the lines in the sources.list file and those in /etc/apt/sources.list.d/ directory that contain the word “repository.”

By verifying the repository URLs in the package manager configuration files, you can ensure they are correct. If there are any typos, edit and correct them, then save the file. Afterward, check if your issue is resolved by executing the sudo apt-get update command.

3. Checking Network Connectivity in Ubuntu

Use thepingcommand to verify your network connection to the remote host and ensure a stable Internet connection.

ping -c 4 us.archive.ubuntu.com

To confirm the network connection, execute the ping command, which sends ICMP (Internet Control Message Protocol) echo requests to the target host and displays the results. Running this command sends four packets to the repository server. If the connection is successful, the output shows details of packets transmitted, received, and the time taken.

To ensure resolution of the issue, verify the active status of the repository server using the following command:

curl -Is http://us.archive.ubuntu.com/ubuntu |

Ensure the server is active by receiving An HTTP/1.1 200 OK output.

If you do not find any problem checking the network connections and the repository server is active, other reasons led to displaying the” repository does not have a release file” error. But if the problem is in the network connections or the failure of the repository server, change the network or be patient in backing up the server.

4. Switching to an alternative repository Mirror

Encountering issues with the repository mirror can be quite troublesome. However, there is a solution to resolve the “repository does not have a release file” error in Ubuntu. It involves changing the repository mirror, which is definitely worth a try. By examining the contents of the sources.list file and identifying the problematic repository entry, you can easily substitute the repository URL with an alternative mirror available on the official Ubuntu website.

To accomplish this, simply follow the steps outlined below:

  • Launch the Linux terminal.
  • Make a backup of your current source list before changes through thecpcommand:

Sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup Open the sources.list file to edit and replace different

  • Open the sources.list file to edit and replace different repository Mirror with the desired editor.

sudo nano /etc/apt/sources.list

  • To replace different repository mirror URLs, find the lines containing the repository mirror URL we want to change. Check the lines that start with “deb” or “deb-src” and contain the URL, and replace the URL with the new mirror’s URL.
  • After making changes, save the file in the nano editor by pressing Ctrl + O and the Enter button, and exit the nano editor by pressing the Ctrl + X buttons.
  • To reflect the changes and refresh the package cache using the new mirror, update the list of packages installed in Ubuntu:

sudo apt update

Why Ubuntu update error no longer have a release file?

When attempting to access a repository that is no longer actively supported for your specific version of Ubuntu, you often encounter the “Repository does not have a release file” issue when updating.

This problem primarily arises due to two reasons:

  1. Ubuntu Release Lifecycle: As each Ubuntu release has a designated lifespan with ongoing maintenance, official repositories are moved or archived after this period, rendering them inaccessible for your current version.
  2. Third-Party Repositories: Some third-party repositories may not update to accommodate every Ubuntu release, resulting in outdated software and a lack of “Release” files tailored to your particular version.

Essentially, this update issue occurs because the repository lacks the necessary data (the “Release” file) to provide suitable packages for your Ubuntu system.

What are some additional troubleshooting tips?

Clean the package cache with sudo apt clean.

Update package lists with sudo apt update after fixing the issue.

How to find the problematic repository?

Usually, the error message identifies the precise repository that is the source of the problem.

You can also look for any lines that might be misspelled or out-of-date in your sources list file (/etc/apt/sources.list).

What to do if the repository is not compatible with my Ubuntu version?

Delete the repository by either commenting out or removing the relevant line from your sources list if it is not compatible with your Ubuntu version.

Alternatively, search for a substitute repository that supports your Ubuntu version and offers the necessary software. Explore suggestions on internet forums or the official software page.

How to stop facing the ‘Repository does not have a Release file’ error?

  • Use third-party repositories with caution: Only add repositories that are verified to work with your Ubuntu version and originate from reliable sources.
  • Verify the compliance of the repository: Before adding a repository, check its documentation or website to confirm compatibility with your specific version of Ubuntu.
  • Update your system frequently: Regularly update your system and package lists to ensure access to the latest compatible applications and repositories.
  • Additionally, prioritize: Reliable sources and systems.

Explore More; Install AnyDesk on Ubuntu Linux

Our Plans; GPU Servers Plan & Pricing



Popular Blog Posts