Even I was getting the same error, While I was updating my kali linux using
apt-get update This is what I did and it worked for me.
grep -ri stable /etc
(some of you might get stable, testing, or rolling in the error message. Just replace that keyword in the above command and fire it)
I got a list of paths to files that used a stable keyword. after having a closer look I found this path.
I removed this file using
rm /etc/apt/apt.conf.d/00local and tried updating and it worked.
For However, this value is set nowhere in /etc. How do I fix this error?
Maybe you should try the above steps in other directories too. :)