Facebook Twitter Instagram
    TecAdmin
    • Home
    • Ubuntu 20.04
      • Upgrade Ubuntu
      • Install Java
      • Install Node.js
      • Install Docker
      • Install LAMP Stack
    • Tutorials
      • AWS
      • Shell Scripting
      • Docker
      • Git
      • MongoDB
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    Home»Linux Distributions»Ubuntu»How to Upgrade Packages on Ubuntu via Command Line

    How to Upgrade Packages on Ubuntu via Command Line

    RahulBy RahulDecember 5, 20182 Mins ReadUpdated:July 20, 2021

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

    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

    Fetch the update for all your repositories for all your apps to all the latest updates lists.

    sudo apt update 
    

    Then run the upgrade command to upgrade all the packages to latest available versions.

    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 to apply security updates to your systems. This 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 (-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.

    Ubuntu
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp
    Previous ArticleHow to Remove “public/index.php” from URL in Laravel
    Next Article How to Install CodeIgniter on Ubuntu 16.04 (Xenial)

    Related Posts

    Changing the Login Screen Background in Ubuntu 22.04 & 20.04

    Updated:May 9, 20222 Mins Read

    (Resolved) Please install all available updates for your release before upgrading

    2 Mins Read

    How to Install LightDM Display Manager on Ubuntu

    Updated:May 10, 20222 Mins Read

    Change Screen Resolution of An Ubuntu VM in Hyper-V

    Updated:May 2, 20222 Mins Read

    How to Check IPv4 Address on Ubuntu 22.04

    2 Mins Read

    How to Configure Static IP Address on Ubuntu 22.04

    Updated:May 4, 20223 Mins Read

    1 Comment

    1. 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

    Recent Posts
    • How to Install Sublime Text 4 on Ubuntu 22.04
    • How to Enable / disable Firewall in Windows
    • How to Install JAVA on Ubuntu 22.04
    • Switching Display Manager in Ubuntu – GDM, LightDM & SDDM
    • Changing the Login Screen Background in Ubuntu 22.04 & 20.04
    Facebook Twitter Instagram Pinterest
    © 2022 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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