Don't make a FrankenDebian
Debian Stable should not be combined with other releases carelessly. If you're trying to install software that isn't available in the current Debian Stable release, it's not a good idea to add repositories for other Debian releases.
First of all, apt-get upgrade default behavior is to upgrade any installed package to the highest available version. If, for example, you configure the
trixie archive on a
bookworm system, APT will try to upgrade almost all packages to
trixie.
This can be mitigated by configuring apt pinning to give priority to packages from
bookworm.
However, even installing few packages from a "future" release can be risky. The problems might not happen right away, but the next time you install updates.
The reason things can break is because the software packaged for one Debian release is built to be compatible with the rest of the software for that release. For example, installing packages from
trixie on a
bookworm system could also install newer versions of core libraries including
libc6. This results in a system that is not
testing or
stable but a broken mix of the two.
Repositories that can create a FrankenDebian if used with Debian Stable:
- Debian testing release (currently trixie)
- Debian unstable release (also known as sid)
- Ubuntu, Mint or other derivative repositories are not compatible with Debian!
- Ubuntu PPAs and other repositories created to distribute single applications
Some third-party repositories might appear safe to use as they contain only packages that have no equivalent in Debian. However, there are no guarantees that any repository will not add more packages in future, leading to breakage.
Finally, packages in official Debian releases have gone through extensive testing, often for months, and only fit packages are allowed in a release. On the other hand, packages from external sources might alter files belonging to other packages, configure the system in unexpected ways, introduce vulnerabilities, cause licensing issues.
Once packages from unofficial sources are introduced in a system it can become difficult to pinpoint the cause of breakage especially if it happens after months.