in ,

Ubuntu 17.10 – How to prevent updating of a specific package?

Exclude packages from “apt-get upgrade” on Ubuntu 17.10

Ubuntu 17.10 Tutorials – Holding back packages

How to prevent updating of a specific package? - ubuntu 18.10 LTS

Because of bugs many users of Ubuntu 17.10 would like to prevent apt-get upgrade and Update Manager from updating a specific package.

There are four ways of holding back packages: with dpkg, apt, aptitude or dselect.

Note: the following command assumes root privileges. In other words, you will probably need to type sudo su before running it.

1) dpkg

Put a package on hold:

echo "<package-name> hold" | sudo dpkg --set-selections

Remove the hold:

echo "<package-name> install" | sudo dpkg --set-selections

Display the status of your packages:

dpkg --get-selections

Display the status of a single package:

dpkg --get-selections | grep "<package-name>"

2) apt

Hold a package:

sudo apt-mark hold <package-name>

Remove the hold:

sudo apt-mark unhold <package-name>

3) dselect

With dselect, enter the [S]elect screen, find the package you wish to hold in its present state and press = or H. The changes will take effect immediately after exiting the [S]elect screen.

The following approaches are limited in that locking/holding a package within aptitude or synaptic doesn’t affect apt-get/apt.

4) aptitude

Hold a package:

sudo aptitude hold <package-name>

Remove the hold:

sudo aptitude unhold <package-name>

Locking with Synaptic Package Manager

Go to Synaptic Package Manager (System > Administration > Synaptic Package Manager).

Click the search button and type the package name.

When you find the package, select it and go to the Package menu and select Lock Version.

Synaptic menu

That package will now not show in the update manager and will not be updated.

If you have encountered a problem or you have any questions or remarks please feel free to set a comment.

If this article helped you to solve your problem please feel free to share it with your friends … with love and prosperity !


What do you think?

1078 points
Upvote Downvote

Total votes: 0

Upvotes: 0

Upvotes percentage: 0.000000%

Downvotes: 0

Downvotes percentage: 0.000000%

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

kali linux 2018.1 tutorials

Kali Linux 2018.1 Apt-get update GPG Error – Key Expired

fluxion kali linux 2018.1 hack wifi

How To Use Fluxion on Kali Linux – Hack Wifi