Q:

Repository does not have a release file (18.10)

$ lsb_release -a          
LSB Version:    core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 18.10
Release:        18.10
Codename:       cosmic

$ sudo apt-get update
Reading package lists... Done   
E: The repository 'http://archive.ubuntu.com/ubuntu quantal 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.
E: The repository 'http://archive.ubuntu.com/ubuntu quantal-updates 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.
E: The repository 'http://ppa.launchpad.net/notepadqq-team/notepadqq/ubuntu cosmic 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.
E: The repository 'http://archive.canonical.com/ubuntu quantal Release' no longer has 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.
W: GPG error: http://extras.ubuntu.com/ubuntu quantal Release: The following signatures were invalid: C47415DFF48C09645B78609416126D3A3E5C1192
E: The repository 'http://extras.ubuntu.com/ubuntu quantal Release' is not signed.
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.

How do I solve these errors?

A:

You have a mix of issues here.
FIRSTLY, you have a lot of references still to quantal.  Quantal has been End of Life for ages, and is no longer supported.  You will need to find where those lines are in your /etc/apt/sources.list file and within /etc/apt/sources.list.d/*.list files and remove those entries.
Secondly, you have some PPAs referring to Cosmic.  Those PPAs are likely not supporting Cosmic and therefore is why you get the 404s there.  remove those entries as well.

