Difference between apt-Get upgarde and dist-Upgrade

Source: Internet
Author: User

Debian/Ubuntu Linux uses apt, Which is used during upgrade:

Apt-Get update
Apt-Get upgrade
Apt-Get dist-Upgrade

But some people often ask,
What is the difference between upgrade and dist-upgrade? If you look at it carefully, you may have different interpretations of upgrade and dist-upgrade, and record your views here.

I think apt-Get
Difference between upgrade and dist-Upgrade:

Upgrade: The system upgrades the existing package. If there is a dependency problem, and this dependency requires the installation of other new packages or affects the dependency of other packages, this package will not be upgraded and will be retained.

Dist-Upgrade: It can intelligently solve dependency problems. If dependency problems exist, you need to install/remove a new package and then try to install/remove it.
(This is usually considered a risky upgrade)

Apt-Get upgrade and apt-Get dist-upgrade are essentially no different.

However, dist-Upgrade
It will identify and handle changes in the dependency relationship, and upgrade will not handle this situation.

For example, Software Package A was originally dependent on B c d, but may have been upgraded in the source. Now it is a dependent on B C
E. In this case, dist-upgrade will delete d Installation E and upgrade Software Package A, while upgrade will deem that the dependency is changed and refuse to upgrade.
Software Package.

Man apt-get:

Upgrade: upgrade is
Used to install the newest versions of all packages currently installed on
System from the sources enumerated in/etc/APT/sources. List. packages currently
Installed with new versions available are retrieved and upgraded; under no
Circumstances are currently installed packages removed, or packages not already
Installed retrieved and installed. New versions of currently installed packages
That cannot be upgraded without changing the install status of another package
Will be left at their current version. An update must be completed MED first so that
Apt-Get knows that new versions of packages are available.
Dist-Upgrade: dist-upgrade in addition to sort Ming
The function of upgrade, also intelligently handles changing dependencies
New versions of packages; Apt-Get has a "smart" Conflict Resolution System, and
It will attempt to upgrade the most important packages at the expense
Less

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.