How can I fix the error "The value 'stable' is invalid for APT::Default-Release"?

I get the same error with apt, so it's unrelated to synaptic. However, this config exists:

# grep -ri stable /etc
/etc/apt.conf.d/99myDefaultRelease:APT::Default-Release "stable";

So changing that file to "jessie" would fix it in my case (as I'm on jessie.)


Have a look into /root/.synaptic/synaptic.conf. Look for the DefaultDistro line and change its value, e.g. replace stable with wheezy.


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.

/etc/apt/apt.conf.d/00local:APT::Default-Release "stable";

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. :)