• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / Linux Command: apt-get update && apt-get upgrade

Linux Command: apt-get update && apt-get upgrade

By Sourabh / November 17, 2020 Category: How To, Ubuntu

Understanding apt-get command in Linux with examples. This post explains apt-get update && apt-get upgrade && apt-get dist-upgrade commands in Linux Ubuntu Systems.

apt

apt provides is a commandline interface for the package management system on Linux Ubuntu Systems. apt is intended for end user interface and enables specialized operations on packages using 2 kinds of apt tools – apt-get and apt-cache.

apt-get is used for installing, upgrading, and cleaning apt packages.
apt-cache is used for finding new packages.

Note that apt-cache performs search query on APT’s package cache. It does not manipulate or edit the system. It only provide operations to search from the package metadata. Whereas the metadata is acquired and updated via the ‘update’ command.

apt-get

The apt-get is apt package handling utility (command-line interface for handling packages.)

apt-get upgrade will not change what is installed (only versions), apt-get dist-upgrade will install or remove packages as necessary to complete the upgrade, apt upgrade will automatically install but not remove packages.apt full-upgrade performs the same function as apt-get dist-upgrade .

apt-get update

apt-get update is used to download package information from all configured sources. It perform package upgrades or search in and display details about all packages available for installation.

When apt-get update command is executed, the command retrieves and scans the packages files, so that information about new and updated packages is available.

Note that an update should always be performed before an upgrade or dist-upgrade.

apt-get upgrade

apt-get upgrade is used to install all the available upgrades of packages which are currently installed on the system.

When the command is executed, it retrieves the information from the sources configured via sources.list.

Using apt-get upgrade, 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.

Note that an update must be performed first so that apt-get knows that new versions of packages are available.

dist-upgrade

dist-upgrade is similar to apt-get upgrade command, but in addition to performing the package upgrade function, it also handles changing dependencies with new versions of packages. Which means, the dist-upgrade command may remove some packages.

The /etc/apt/sources.list file contains a list of locations from which to retrieve desired package files.

Apart from all these 3 command options, there is another useful apt-get command option – apt-get full-upgrade.

The full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole.

Primary Sidebar

Latest Posts

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

Linux Command To Check RAM Size In Ubuntu Terminal In GB

How To Install Proprietary Drivers In Linux Ubuntu Using Terminal

How To Shutdown Linux With A 15 Minute Delay And Message

Free AI Courses With Certificate For Beginners In India

Best AI Plugins For WordPress To Use In 2026

3 Commands To Check USB Connection In Linux Terminal

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap