While using older images of raspberry pi, the upgrade fails with the repository 404 not found.
The reason is the older images repository is moved to legacy.raspbian.org.
I ran into this same issue but didn’t want to go through the work of upgrading versions,
so simply updated the mirror link in my sources.list from mirrordirector.raspbian.org to
legacy.raspbian.org
sources.list
deb http://legacy.raspbian.org/raspbian/ jessie main contrib non-free rpi
# Uncomment line below then ‘apt-get update’ to enable ‘apt-get source’
#deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free
24 years of experience in various layers of software. Primarily experienced in system side software design and development on server management software. Interested in linux development in x86 and arm architecture.