Upgrade software under Ubuntu without upgrading the specified Software

Source: Internet
Author: User
In Ubuntu, use the apt-get command to upgrade almost all software packages, but "keep" some software as the current version. You can use the dpkg command. For example, when I use the apt-get command to upgrade my Ubuntu or Debian operating system, the following results will be displayed: % sudoapt-getupgrade [...] aptapt-transport-httpsapt-utilsghostscriptghostscript

In Ubuntu, use the apt-get command to upgrade almost all software packages, but "keep" some software as the current version. You can use the dpkg command. For example, when I use the apt-get command to upgrade my Ubuntu or Debian operating system, the following results will be displayed:

% Sudo apt-get upgrade

[...]

Apt-transport-https apt-utils ghostscript-cups ghostscript-x google-chrome-beta hal indicator-applet
Nvidia-current-modaliases php-pear php5 php5-cli

If I do not want to upgrade the php5 package, I can "keep" the current version is not upgraded. [LINUX community www.LinuxIDC.com]
Switch to root user (su or sudo-s)
Run:

Echo php5 hold | sudo dpkg -- set-selections

Then, after executing the apt-get upgrade command, the package will be "retained ".

% Sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
Php5

If you want to upgrade the software package to be "retained" by you, execute

Echo php5 hold | sudo dpkg -- set-selections

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.