Ubuntu drip--apt-get Update and upgrade's role

Source: Internet
Author: User

    UpdateUpdate is used to resynchronize the package, index files from their sources. The indexes of available packages is fetched from the location (s) specified in/etc/apt/sources.list. For example, when using a Debian archive, this command retrieves and scans the packages.gz files, so t Hat information about new and updated packages is available. An update should always is performed before an upgrade or Dist-upgrade. Please be aware the overall progress meter would be incorrect as the size of the package files can Not being known in advance.UpgradeUpgrade is used to install the newest versions of all packages currently installed on the system from the source s enumerated in/etc/apt/sources.list. Packages currently installed with new versions available is retrieved and upgraded; Under no circumstances is currently installed packages removed, or packages not already installed RET Rieved and installed. New versions of currently installed packages that cannot be upgraded without changing the install stat US of another package would be is left at their current version. An update must is performed first soApt-getknows that new versions of packages is available.Dist-upgradeDist-upgrade In addition to performing the function of upgrade, also intelligently handles changing dependencies With new versions of packages;Apt-getHas a "smart" conflict resolution system, and it'll attempt to upgrade the very important packages at the Expense of less important ones if necessary. The Dist-upgrade command may therefore remove some packages. The/etc/apt/sources.list file contains a list of locations from which to retrieve desired package fil Es. See Alsoapt_preferences(5) for a mechanism to overriding the general settings for individual packages.

The above content is extracted from the Apt-get man document. The meaning of this is that the function of update is to synchronize the index file of the package from the source defined in the/etc/apt/source.list file, that is, running this command does not actually update the software, but rather the same as checking for updates under Windows, and getting the state of the software.

The upgrade is the index file of the package that is synchronized with the update command, to really update the software.

And Dist-upgrade is a smarter Upgrade,man document that says it's smarter about software dependencies in the update process, and it also gets the addresses from the/etc/apt/source.list file and retrieves the packages that need to be updated from those addresses.


Finally, it is important to note that before each update, we need to run update before we can run upgrade and Dist-upgrade, because the equivalent update command gets some information about the package, such as size and version number, and then runs upgrade to download the package. If you do not get the package information, then the upgrade is invalid!

Ubuntu drip--apt-get Update and upgrade's role

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.