How to fix E: The value 'value' is invalid for APT::Default-Release in APT
The "invalid for APT::Default-Release" error occurs when the release name specified in your APT configuration doesn't match any release in your sources.list. This prevents apt from finding the specified distribution, causing package installation to fail.
Quick fix
Fixes E: The value 'value' is invalid for APT::Default-Release
grep -r "Default-Release" /etc/apt/- Check your current APT::Default-Release configuration
- View your sources.list to verify the release exists
- Fix the configuration mismatch
- Verify the fix works
grep -r "Default-Release" /etc/apt/E: The value 'value' is invalid for APT::Default-Release
What this error means
This error happens when APT tries to use a default release that doesn't exist in your configured package sources. The APT::Default-Release setting tells apt which Debian/Ubuntu release to prefer when multiple versions of a package are available. When the specified release name (like "stable", "bookworm", or "jammy") doesn't appear in any of your sources.list entries, APT rejects it. Common scenarios include: - Setting APT::Default-Release to "stable" when your sources only have codename-based entries like "bookworm" - Trying to use a release that's no longer supported on your system - Referencing a backports release that isn't configured in sources.list - Typos in the release name configuration
Typical symptoms
- apt-get install or apt upgrade fails with the error message
- Cannot install or update packages regardless of which package you specify
- Error occurs immediately when running apt commands, before any package selection
- Other apt operations like 'apt update' may work, but install/upgrade fail
Common causes
- The release name in APT::Default-Release doesn't exist in your sources.list files
- Typo or misspelling in the configured release name
- Release name mismatch between configuration and sources (e.g., 'stable' vs 'bookworm')
- Release is no longer available after a Debian/Ubuntu version upgrade
- Backports or other special releases configured in APT config but not in sources
How to fix "E: The value 'value' is invalid for APT::Default-Release"
Search for the Default-Release setting in your APT configuration files:
grep -r "Default-Release" /etc/apt/This will show where the setting is configured. Common locations are:
- /etc/apt/apt.conf
- /etc/apt/apt.conf.d/ (various files in this directory)
- /root/.synaptic/synaptic.conf (if using Synaptic package manager)
Note the exact value that's set (e.g., 'stable', 'bookworm', 'jammy').
Check what releases are actually configured in your sources:
cat /etc/apt/sources.list
cat /etc/apt/sources.list.d/*Look at the fourth column of each deb line - this is the release name. For example:
- deb http://deb.debian.org/debian bookworm main - releases named "bookworm"
- deb http://deb.debian.org/debian stable main - releases named "stable"
Compare this with the value from step 1. If your Default-Release doesn't appear in any line, that's your problem.
You have three options:
Option A: Update Default-Release to match your sources (recommended)
If your sources use codenames like "bookworm", update APT config:
# Edit the file where Default-Release was found
sudo nano /etc/apt/apt.conf.d/00local
# Change: APT::Default-Release "bookworm";
# (Use the actual release names from your sources.list)Option B: Update sources.list to include the desired release
If you want to use "stable" or another suite name, add it to sources:
echo "deb http://deb.debian.org/debian stable main contrib non-free" | sudo tee -a /etc/apt/sources.list.d/stable.listOption C: Remove the Default-Release configuration entirely
The safest option if you don't need a default release:
# Find and comment out or remove the Default-Release line
sudo nano /etc/apt/apt.conf.d/00local
# or delete the file if it only contains this setting:
sudo rm /etc/apt/apt.conf.d/00localAfter making changes, update the package cache:
sudo apt updateOnce you've fixed the configuration, test apt:
sudo apt install -y package-nameReplace package-name with any package you want to install. If this succeeds without the error, your fix worked.
If you still see the error, double-check:
1. You edited the correct file
2. The syntax is valid (APT config uses quotes and semicolons)
3. You ran sudo apt update after making changes
4. The release name exactly matches what's in sources.list (case-sensitive)
Advanced notes
Understanding APT::Default-Release
This setting is primarily useful when you have multiple versions of the same package available from different releases. For example, if you have both "stable" and "testing" in your sources, APT might offer both old and new versions of a package. The Default-Release setting tells APT which to prefer.
Release naming in Debian/Ubuntu
Debian uses two naming schemes:
- Suite names: "stable", "testing", "unstable", "oldstable"
- Codenames: "bookworm" (current stable), "trixie" (testing), "sid" (unstable)
Ubuntu uses version names: "focal", "jammy", "noble", etc.
These are often NOT interchangeable in APT configuration. If your sources use codenames, your Default-Release should also use codenames.
Backports special case
If you use backports (backported newer packages for older releases), don't set it as Default-Release. Instead, use APT pinning in /etc/apt/preferences to selectively pull backports packages only when explicitly requested:
Package: *
Pin: release a=bookworm-backports
Pin-Priority: 100Then install from backports with: sudo apt install -t bookworm-backports package-name
Frequently asked questions
- What does "E: The value 'value' is invalid for APT::Default-Release" mean?
- This error happens when APT tries to use a default release that doesn't exist in your configured package sources. The APT::Default-Release setting tells apt which Debian/Ubuntu release to prefer when multiple versions of a package are available. list entries, APT rejects it.
- How do I fix "E: The value 'value' is invalid for APT::Default-Release"?
- The "invalid for APT::Default-Release" error occurs when the release name specified in your APT configuration doesn't match any release in your sources.list. This prevents apt from finding the specified distribution, causing package installation to fail.
- What causes "E: The value 'value' is invalid for APT::Default-Release"?
- The release name in APT::Default-Release doesn't exist in your sources.list files Typo or misspelling in the configured release name Release name mismatch between configuration and sources (e.g., 'stable' vs 'bookworm')
- Is the "E: The value 'value' is invalid for APT::Default-Release" error serious?
- It is a medium-severity error โ more of a blocker than a risk. The steps above resolve it.
Official resources & further reading
- ๐APT Official Documentation
- ๐APT configuration reference (Debian man pages)(Official Docs)
- ๐