I need a couple of older libraries to make a program work. I can hold the packages with the following commands:

apt-mark hold package
echo package hold | dpkg --set-selections

That way when I try to upgrade the system through apt full-upgrade the system holds the packages correctly.

However, if I try to upgrade through the AppCenter, the packages are upgraded despite of the previous orders to apt and dpkg.

How can I prevent AppCenter from upgrading certain packages?


  • 2
    Did you ever solve this one? I guess perhaps CLI upgrade is the only way for you unless anyone else has wisdom to share. Commented Feb 9, 2017 at 16:48
  • Have you tried using Synaptic for this? I don't recall the steps but I know you can lock specific versions.
    – pretz
    Commented Oct 6, 2017 at 12:40

2 Answers 2


Have you tried blacklisting some specific versions of the packages? I guess this should help for at least a while!

Package: compiz-plugins-main
Pin: version 1:
Pin-Priority: -1

This goes into the /etc/apt/preferences file.

As mentioned here


This has worked for me in the past. I run Unifi Controller on this desktop and I didn't want the system to update the version I was running due to some issues that I wanted to see get worked out first. "sudo apt-mark hold unifi" did exactly that and I updated everything else for a few weeks like normal until I was ready to update unifi. "sudo apt-mark unhold unifi" released the hold. "sudo apt-mark showhold" to check it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.