Using PPA or incorporating third-party repositories is one of the many ways to instal apps in Ubuntu. A few magical lines give you fast access to apps or a newer version of the software that isn’t installed by default in Ubuntu.
All appears to be fine until you get into the habit of installing additional third-party repositories, at which point you experience an error similar to this when upgrading Ubuntu:
E: The repository ‘http://apt.vestacp.com/focal focal 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 configuration details.
This error is usually found if you are trying to update ubuntu from command line using this command:
sudo apt-get update
It’s not a big issue unless some of the scripts depend on it to install themselves. It then becomes important to remove these errors.
How to fix it?
You’re probably aware that each Ubuntu release is assigned a codename. Focal Fossa is the codename for Ubuntu 20.04. The term “focal” in the error message refers to Ubuntu 20.04’s Focal Fossa.
Although you added a third-party repository to your system’s sources list, this new repository is not available for your current Ubuntu edition, according to the error.
Why is this the case? Since you’re possibly using a newer edition of Ubuntu, and the developer hasn’t yet released updates for it.
To delete this unavailable directory, like in this case, the repository of Vesta Control Panel, open the command line and input these commands.
cd /etc/apt/sources.list.d ls -alh
try to find the name of the culprit repository, in this case vesta.list
The next command is to remove this file
sudo rm -rf vesta.list
Now update the ubuntu and you should see no error.
sudo apt-get update
You should be able to update now with no errors. If these kind of errors still persist, you can comment below and I can help you with similar commands.