When you use sudo apt update and get the following error:

...
E: The repository 'XXX' 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.

Goto /etc/apt/sources.list.d and remove the caused (.list) file.