Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Distributions»Ubuntu»How to Upgrade Packages on Ubuntu via Command Line

    How to Upgrade Packages on Ubuntu via Command Line

    By RahulSeptember 6, 20222 Mins Read

    It is recommended for all Linux system users to keep packages up to date. All the Linux distributions provide security and package upgrades from time to time. You must keep the Ubuntu packages updated.

    Advertisement

    This tutorial will help you to update the latest packages on a Ubuntu system. You can also apply only security updates silently via the command line.

    Update Ubuntu Packages

    Use the ‘apt update‘ command to download the package information from all the configured sources from all repositories on your system.

    sudo apt update 
    

    Then run the upgrade command to upgrade currently installed packages to the latest available versions from the configured sources.

    sudo apt upgrade 
    

    Now, run the dist-upgrade which intelligently handles changing dependencies with new versions of packages. It also removes obsolete packages from your system.

    sudo apt dist-upgrade 
    

    Apply Security Updates Only

    You may don’t like to update all the packages on your Ubuntu system. But we still recommend you apply security updates to your systems. These upgrades are highly recommended for the production system to keep them secure.

    Use the unattended upgrade to silently install updates without user interaction on your Ubuntu system.

    sudo apt install unattended-upgrades 
    

    But, if you want to run an interactive installation or upgrade use the (-d) display parameter.

    sudo apt install unattended-upgrades -d 
    

    Conclusion

    In this quick write-up, you have learned about upgrading packages on Ubuntu via the command line.

    apt pacakges Ubuntu
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Learn Apt Command Line in Linux

    12 Apt Command Examples in Ubuntu & Debian Linux

    How to Setup DKIM (DomainKeys) with Postfix

    A Step-by-Step Guide to Installing OpenDKIM with Postfix on Ubuntu – Unleash the Power of DKIM!

    How to Install Composer on Ubuntu 22.04

    How to Install Composer on Ubuntu 22.04

    View 2 Comments

    2 Comments

    1. Daniel on September 5, 2022 11:55 am

      Thanks for this. exactly what I needed 🙂

      Reply
    2. Makhaya Pule Maqekoane on July 19, 2021 6:27 pm

      Dear Rahul, thanking you for the job well done.
      Your writings are understandable, pricise and straight to the point.

      Wishing you success.

      Sincerely

      Makhaya Pule Maqekoane

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Configure Postfix to Use Gmail SMTP on Ubuntu & Debian
    • PHP Arrays: A Beginner’s Guide
    • Deploying Flask Application on Ubuntu (Apache+WSGI)
    • OpenSSL: Working with SSL Certificates, Private Keys and CSRs
    • How to Create and Read List in Python
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.