Fix: the repository does not have a release file

The PPA repository is the popular way to install third-party applications or software for the specific Linux system. It is specially designed for Debian/Ubuntu systems to download and install the required packages in the system. While installing packages from the PPA repository or updating the system, an error  “the repository does not have a release file” occurs. This guide will demonstrate possible solutions to tackle the error mentioned above. The content of the post is as follows:

Reason: PPA Repository Not Supported/Not Added Successfully

One of the main reasons is that you have added a PPA repository in the system source list that is not compatible with your latest Debian/Ubuntu version due to outdated version. The error can be invoked during the system update, installing any package from PPA, or adding the PPA.

Note: As an example, the PPA repository named “ppa:webupd8team/java” is being considered in this post.

Solution: Remove the Outdated PPA and Add it Again

To tackle this error, trace out the particular file that generates the error and delete it from the source list.

To do so, execute the below script to display the installed PPA repository from the sources:

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

Remove PPA Repository

After that, the “remove” utility is used to remove the outdated package downloaded from the PPA repository. Follow the below script to download the repository:

$ sudo add-apt-repository --remove ppa:webupd8team/java

After executing the script, it required permission to delete packages. Press the “ENTER” for completion.

Adding PPA Again

To resolve the error, you must specify the appropriate name of the repository or package and reinstall it in the system. In our case, the PPA repository is being added again:

$ sudo add-apt-repository ppa:webupd8team/java

After executing the script, it required permission to install packages. Then, hit “ENTER” to continue the installation process:

Update Repository

To update the system repository, the below script will update the system packages to install the new packages:

$ sudo apt update

Once the PPA is added and the system is updated, you can run the “sudo apt install <package-name>” to install the specific package.

Conclusion

In Ubuntu, the “the repository does not have a release file” error can be resolved by removing and then adding the specific PPA repository. Once the process is performed successfully, now the error will be resolved. Before adding that, you can check the availability of the repository and whether it is available for your system. This guide has addressed the reason and the possible solution to fix the error.