[How To] Prevent Package Update or Upgrade in Ubuntu

Care to Share?

Many of us like to keep everything up-to-date in our computer. Ubuntu provides regular updates through the Update Manager. Ubuntu even provides option of offline updates. But there may be a situation where one wants to retain the version of a particular application for some specific purpose. in that case, user can force prevent the package update.

Below is the procedure to prevent the update of a particular package or application in Ubuntu:

Install Synaptic Package Manager in Ubuntu:

Once upon a time Synaptic used to ship by default in Ubuntu and it was also the default package manager in Ubuntu until 11.10. Use the following command to install Synaptic Package Manager in terminal (Ctrl+Alt+T):

sudo apt-get install synaptic

Stop a package from being upgraded:

  • Start the Synaptic Package Manager from Ubuntu Unity dash.
  • Once you have opened it, search for your desired package or application in the search bar.
  • Select that package.
  • Now from the Package menu option, choose the Lock Version.
  • Save it.

Voila! Now your selected package will be excluded from further upgrades. If you want it to be updated again at a certain time in future, just do the same and this time select Unlock Version. Cheers :)

  • Ancient Monk

    What should I do if I need to install the specific version of package and dependencies? Best example is the linux kernel. I have installed, latest and I need to correctly update to and lock it from upgrade.

    • http://itsfoss.com/ Abhishek Prakash

      For Kernel upgrades, you can choose to upgrade to any specific version (instead of upgrading to the latest version).