apt-get: holding back a package

October 2, 2014

acer-notebook-debianWhile setting up Debian on a notebook I kinda had tough time with the “flash player” plugin crashing incessantly in Google Chrome. A work-around has been published here which involves replacing the flash-plugin that is shipped with Google Chrome from a previous version.

I downloaded a previous iteration from pcbeta.com. However, instead of extracting & replacing just the libpepflashplayer.so file I installed that version of Google Chrome. Flash plugin doesn’t crash anymore. I thought I’d use the browser for a while until the bug is fixed in the next iteration of Google Chrome.

Now, an annoying issue cropped up, as I would run a dist-upgrade Debian shows a newer version of Google Chrome is available and would download it to proceed further.

# apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be upgraded: google-chrome-stable 1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 49.3 MB of archives. After this operation, 311 kB disk space will be freed. Do you want to continue [Y/n]?

One way to stop this would be putting the package on hold. In the case of Google Chrome, it’s triggered this way:

# echo "google-chrome-stable hold" | dpkg --set-selections

This time when running apt-get dist-upgrade it’s displayed as being held back.

# apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages have been kept back: google-chrome-stable 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Un-holding the same will require:

# echo "google-chrome-stable install" | dpkg --set-selections

Image source: bsdnexus.com