How to Use “sudo apt full-upgrade” in Linux [A complete Guide]

LINUX
FUNDAMENTALS
A Complete Guide for Beginners Enroll Course Now

The ‘sudo apt full-upgrade’ command is used to upgrade packages to their latest versions by replacing or removing the old version package. This work is done by an apt package manager, a reliable package management tool widely used in the Debian-based Linux Distro such as Ubuntu. With this package manager, you can install, remove, update, or upgrade any packages in Linux. In this article, I will show you how to run ‘sudo apt full-upgrade’ in the Ubuntu terminal. Moreover, I will walk you through a lot of essential topics regarding upgrades with apt. To know more, stay tuned.

What Does “apt full-upgrade” Do?

Basically upgrading a package to its most recent version is the main task of the apt full-upgrade command. However, it may remove the old version package while upgrading it. So it’s not a safer option to run this command in your Ubuntu terminal as it can make changes to the whole system and eventually break your Linux OS. Therefore, run this command with proper caution.

How to Use “sudo apt full-upgrade” in Linux?

If you are suffering with the old version package and wish to have a new version but don’t know about the upgrading procedure. Then read this section carefully to upgrade the packages in your Linux system. Check the steps below:

  1. Open the Ubuntu terminal.
  2. Update the package lists before upgrading operation by writing the following command:
    sudo apt update
    EXPLANATION
    • sudo: Permits administrative privileges.
    • apt: Provides a command line interface for the package management system.
    • update: Updates packages in Linux.

    updating package list using apt

    Type your Ubuntu password and press ENTER to initiate the update process.

  3. Now type the following command to perform a full upgrade. A complete upgrade entails that the Linux OS may destroy the old version package if it feels so.

    sudo apt full-upgrade
    EXPLANATION
    • full-upgrade: Upgrades packages to the latest version by removing or replacing the old one in Linux.

    performing sudo apt full upgrade in Linux

    After that, type ‘y’ to continue the procedure and press ENTER.

    giving permission by typing y

    Wait for a few minutes. Afterward, the sudo apt full-upgrade operation will be finished.

  4. In some cases, your system may require a reboot. So reboot the system using the following code:
    sudo reboot
    EXPLANATION
    • reboot: Restart the computer and apply the changes made by you.

    This command prints no output but restarts the operating system.

    log in to the ubuntu by typing password

    Now log in again by typing the Ubuntu password after the restart is completed.

How Do You Prevent Packages From Breaking While Using Full-upgrade?

When you run the full-upgrade command, it may break some installed packages. In that case, read carefully all the package information before permitting by writing ‘y’ to the prompt. First of all, carefully check what packages you are removing to upgrade to the recent version. After checking, press ENTER to proceed. Moreover, to prevent any particular package from upgrading, you can use sudo apt-mark hold <package_name> command.

“sudo apt upgrade” Vs “full-upgrade”

There are some differences between apt upgrade and apt full-upgrade. Let’s know the dissimilarities of these commands:

apt upgrade apt full-upgrade
The apt upgrade command mainly upgrades the installed packages without making any changes to the system. The apt full-upgrade upgrades packages and makes changes to the whole system if any package conflicts occur.
This command does not remove any old version packages to upgrade those. Sometimes this command can remove the old version packages to upgrade to the newer ones.
It does not break or alter the whole Linux system while upgrading. During the upgrading procedure, it can break the whole system if something hampers the process.
This apt-upgrade can only upgrade a package if no clashes are present. It offers a complete package upgrade, solving all the issues.

Why Does “sudo apt full-upgrade” Need Caution?

Since apt full-upgrade is a powerful command that can alter the system as a whole, proper caution is needed before applying this command. Otherwise, you can face some difficulties as the following:

Problem 01: Remove Customized Software

Suppose, you have a customized software package and the dependencies depend on the old version packages. In that case, apt full-upgrade will remove your software package during the upgrade operation. And it is not desirable to remove your necessary packages in this way.  So be careful with this command.

Problem 02: Alter Dependencies

The apt package manager is a great tool for resolving dependency conflicts. Let’s say, you have two software packages: one is ‘x’ and the other one is ‘y’. Both software package depends on the graphics card v1.0. Now, run the upgrade command to upgrade the ‘x’ package from v1.0 to v2.0. However, the repo for the new distro does not have graphics card v1.0 so the apt ful-upgrade command will alter the v1.0 driver as it is not needed anymore. As software ‘y’ depends on this driver, this software package will not work in your system if the graphics card v1.0 is changed.

Why Should You Have “sudo apt full-upgrade”?

There are tons of reasons that you should have the sudo apt full-upgrade command. They are as follows:

  • Ensures a complete upgrade of the packages to their updated versions available.
  • Updates the security system and maintains a healthy environment.
  • Resolves dependency conflicts actively.
  • Avail new features and fixes the bugs encountered during the upgrade process.
  • Gives long-term support to the users.

Conclusion

I hope this article helps you understand what sudo apt full-upgrade does and how to use it. Moreover, you got to know about the detailed steps to upgrade packages using the apt full-upgrade. Actually, it is the more advanced version of the apt upgrade command. The primary differences between these two commands are explored here. Now, you also know how to prevent packages from breaking during the upgrade procedure. So use this command on your own now. Best wishes.

People Also Ask

How to install apt packages?
To install apt packages simply run: sudo apt install <package name> in your Ubuntu terminal.
What is the main difference between sudo apt update and full upgrade?
The basic difference is that sudo apt update only updates the package list and does not remove the older versions of packages whereas the sudo apt full-upgrade command upgrades the installed software packages to their recent version by resolving dependency conflicts and if necessary removing the older versions of packages.
Is it safe to run sudo apt full-upgrade?
Actually, it may break your system by altering and removing package dependency. Therefore, take adequate caution before using this command.
What does sudo apt full-upgrade do?
The sudo apt full-upgrade command is used to upgrade packages to their latest versions by replacing or removing the old version package.
How to prevent packages from breaking using sudo apt full-upgrade?
To prevent packages from breaking while working with sudo apt full-upgrade, check the package information carefully before proceeding to remove it. However, if you have special packages that you don’t want to upgrade, you can use sudo apt-mark hold <package_name>.

Related Articles


<< Go Back to Upgrade Package in Linux | Package Management in Linux | Learn Linux Basics

Rate this post
Mitu Akter Mou

Hello, This is Mitu Akter Mou, currently working as a Linux Content Developer Executive at SOFTEKO for the Linuxsimply project. I hold a bachelor's degree in Biomedical Engineering from Khulna University of Engineering & Technology (KUET). Experiencing new stuff and gathering insights from them seems very happening to me. My goal here is to simplify the life of Linux users by making creative articles, blogs, and video content for all of them. Read Full Bio

Leave a Comment