If you faced to an error of
The repository ‘http://archive.raspberrypi.org/debian stretch Release’ does no longer have a Release file.
them, you can just solve this error with sudo apt-get dist-upgrade
.
Then try to sudo apt-get update
and sudo apt-get upgrade
.