Taming Dependency Hell: Using apt-mark to Pin Packages in Debian-Based Systems

Introduction to Dependency Hell

I’ve seen this go wrong when you’re in the middle of a critical project and a package update breaks a dependency, causing system instability. In Debian-based systems, apt-mark is a useful tool for pinning packages and avoiding this kind of chaos. It’s not a silver bullet, but it can help prevent packages from being automatically removed or upgraded, which can cause conflicts.

What is apt-mark?

apt-mark is a command-line tool that allows you to mark packages as automatically installed or manually installed. This can be a lifesaver when you need to prevent a package from being automatically upgraded to a newer version that may cause conflicts. Don’t bother with trying to manually manage dependencies - apt-mark makes it easy to pin packages to a specific version.

[Read More]