[How To] Prevent Package Update or Upgrade in Ubuntu

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 :)

About Abhishek Prakash

I am Abhishek Prakash, 'creator' of It's F.O.S.S. Working as a software professional. I am an avid Linux lover and Open Source enthusiast. I use Ubuntu and believe in sharing knowledge. Apart from Linux, I love classic detective mystery. Huge fan of Agatha Christie work.

Deals from It's FOSS Shop

Comments

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