On an outdated Debian 6 squeeze i got issue during "apt-get update":

W: Failed to fetch http://security.debian.org/dists/squ...64/Packages.gz 404 Not Found [IP: * 80]
E: Some index files failed to download, they have been ignored, or old ones used instead.
I tried to add a repository, but got an error:

"etch Release: The following signatures were invalid: KEYEXPIRED"
To remove the error, i opened /etc/apt/sources.list and removed existing lines and added instead following:

deb http://archive.debian.org/debian/ squeeze main non-free contrib
Then run:
apt-get update & apt-get upgrade

PS: For other Debian version, one may try https://debgen.simplylinux.ch/index.php?generate