Site icon New Generation Enterprise Linux

Stop APT from ignoring your manual package holds during full upgrades

Package Management (Apt/Dnf/Pacman Internals)

Stop APT from ignoring your manual package holds during full upgrades

🧩 The Challenge

You finally pin a library version because a legacy app explodes otherwise, only to have dist-upgrade smash right over it anyway. It’s infuriating when you think you’ve locked a package, but the solver decides it knows better than you.

💡 The Fix

Use the apt-mark command to explicitly set a hold, which forces the resolver to stop thinking it can upgrade your stuff behind your back. It basically marks the package as broken in the eyes of an automated upgrade process.

apt-mark hold package_name

⚙️ Why It Works

Setting a hold modifies the internal apt database to mark the package as having a manual installation state that overrides the automatic upgrade resolver. This stops the dependency checker from suggesting or forcing a newer version when you pull down a full system update.

🚀 Pro-Tip: Check exactly what you have locked down with apt-mark showhold before you start a long-running maintenance window.

Linux Tips & Tricks | © ngelinux.com | 10/25/2026

0 0 votes
Article Rating
Exit mobile version