AboutBlogContact
DevOps & InfrastructureFebruary 12, 2003 2 min read 142Updated: June 22, 2026

Debian Sid: Mastering APT Pinning (2003)

AunimedaAunimeda
📋 Table of Contents

Debian Sid: Mastering APT Pinning

If you're running Debian Sid (Unstable), you know the thrill of apt-get dist-upgrade breaking your X server. But sometimes you want the latest GNOME while keeping your core system on Testing or Stable. This is where APT pinning comes in.

The Preferences File

The magic happens in /etc/apt/preferences. By assigning priorities to different releases, you can control exactly where your packages come from.

Package: *
Pin: release a=testing
Pin-Priority: 900

Package: *
Pin: release a=unstable
Pin-Priority: 800

In this setup, APT will prefer Testing. If a package exists in both, the one from Testing gets installed.

Pinning a Specific Package

Say you absolutely need the latest kernel from Unstable, but nothing else.

Package: linux-image-2.4.20-k7
Pin: release a=unstable
Pin-Priority: 1001

A priority over 1000 means "install this even if it requires a downgrade." Use this with extreme caution.

Tracking Dependencies

The real trick is ensuring your dependencies don't spiral out of control. Always use the -t flag to see what's about to happen:

# apt-get install -t unstable libc6

This tells APT to treat Unstable as the target release for this specific command. If you're not careful, you'll end up with a Frankendebian that's impossible to maintain. But hey, that's the price of having the newest bits, right?


Aunimeda provides DevOps engineering and infrastructure services - CI/CD pipelines, containerization, cloud deployments, and monitoring setups.

Contact us to discuss your infrastructure needs. See also: DevOps Services, Custom Software Development

Read Also

Docker Compose vs Kubernetes: What Small Teams Actually Need in 2026aunimeda
DevOps & Infrastructure

Docker Compose vs Kubernetes: What Small Teams Actually Need in 2026

Kubernetes is powerful and over-engineered for most small products. Docker Compose is simple and hits its limits faster than you'd think. Here's where the actual boundary is, with real configs for both.

OpenTelemetry in Node.js: Distributed Tracing From Zero to Productionaunimeda
DevOps & Infrastructure

OpenTelemetry in Node.js: Distributed Tracing From Zero to Production

Logs tell you what happened. Traces tell you why it was slow. This is the complete guide to wiring OpenTelemetry into a Node.js microservices stack - auto-instrumentation, custom spans, trace propagation across HTTP and queues, and sampling strategies that won't bankrupt you.

Beyond Zero-Downtime: Mastering State Persistence in Distributed Deploymentsaunimeda
DevOps & Infrastructure

Beyond Zero-Downtime: Mastering State Persistence in Distributed Deployments

Zero-downtime deployment was the goal in 2018. In 2026, the challenge is 'State Continuity.' We explore how to manage database migrations and persistent WebSocket connections without dropping a single user session.

Need IT development for your business?

We build websites, mobile apps and AI solutions. Free consultation.

DevOps Services

Get Consultation All articles