How to fix E: The value 'value' is invalid for APT::Default-Release in APT

APTINTERMEDIATEMEDIUMUpdated Dec 29, 2025ยท 317 views

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/
  1. Check your current APT::Default-Release configuration
  2. View your sources.list to verify the release exists
  3. Fix the configuration mismatch
  4. Verify the fix works
apt โ€” error
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

  1. The release name in APT::Default-Release doesn't exist in your sources.list files
  2. Typo or misspelling in the configured release name
  3. Release name mismatch between configuration and sources (e.g., 'stable' vs 'bookworm')
  4. Release is no longer available after a Debian/Ubuntu version upgrade
  5. 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"

1Check your current APT::Default-Release configuration

Search for the Default-Release setting in your APT configuration files:

bash
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').

2View your sources.list to verify the release exists

Check what releases are actually configured in your sources:

bash
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.

3Fix the configuration mismatch

You have three options:

Option A: Update Default-Release to match your sources (recommended)

If your sources use codenames like "bookworm", update APT config:

bash
# 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:

bash
echo "deb http://deb.debian.org/debian stable main contrib non-free" | sudo tee -a /etc/apt/sources.list.d/stable.list

Option C: Remove the Default-Release configuration entirely

The safest option if you don't need a default release:

bash
# 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/00local

After making changes, update the package cache:

bash
sudo apt update
4Verify the fix works

Once you've fixed the configuration, test apt:

bash
sudo apt install -y package-name

Replace 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:

bash
Package: *
Pin: release a=bookworm-backports
Pin-Priority: 100

Then 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