Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How to update all packages of Ubuntu via command line?

  1. #1
    Join Date
    Jul 2008
    Beans
    117

    How to update all packages of Ubuntu via command line?

    I did some brief searches and could only find how to update the index list and upgrade the packages using apt and the command line.

    I want to know how to update the packages so I stay on Ubuntu 10 but have updated software.

    For example when I login through the command line I get the message:

    75 packages can be updated.
    46 updates are security updates.

    How to just normally update these packages, without necessarily upgrading?

  2. #2
    Join Date
    Oct 2006
    Beans
    58,286

    Re: How to update all packages of Ubuntu via command line?

    I'm a little confused, you are asking how to update via the command line but saying you've found the answers ?

    If you want to upgrade your packages via command line do

    Code:
    sudo apt-get update
    and

    Code:
    sudo apt-get upgrade

  3. #3
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: How to update all packages of Ubuntu via command line?

    Quote Originally Posted by howefield View Post
    I'm a little confused, you are asking how to update via the command line but saying you've found the answers ?
    If you log in to a shell on some Ubuntu versions, the message-of-the-day includes the report the OP cites. The MOTD has been changed quite a bit starting with 10.10, I believe, and doesn't have this information any longer.

  4. #4
    Join Date
    Sep 2006
    Beans
    9

    Re: How to update all packages of Ubuntu via command line?

    Another option to update and upgrade your packages via the command line is by using:
    Code:
    sudo aptitude update
    and
    Code:
    sudo aptitude safe-upgrade
    Some consider aptitude safer to use than apt-get. See http://ubuntuforums.org/showthread.php?t=379804.

  5. #5
    Join Date
    Sep 2011
    Location
    Denver, CO
    Beans
    87
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: How to update all packages of Ubuntu via command line?

    Or you can use one command:


    sudo apt-get update && sudo apt-get upgrade

  6. #6
    Join Date
    Feb 2010
    Location
    Obscurial Springs
    Beans
    15,209
    Distro
    Ubuntu Budgie Development Release

    Re: How to update all packages of Ubuntu via command line?

    If you are concerned about upgrading Ubuntu to the next version open the update manger and enter settings . Under the updates tab in the section that displays release upgrades , select never . After doing this , when you update using the commands above you won't have to worry about accidentally Upgrading to the next Ubuntu version . Logout and back in as a precaution before using the commands .
    "Our intention creates our reality. "

    Ubuntu Documentation Search: Popular Pages
    Ubuntu: Security Basics
    Ubuntu: Flavors

  7. #7
    Join Date
    Jul 2008
    Beans
    117

    Re: How to update all packages of Ubuntu via command line?

    sudo apt-get update
    Update the Package Index: The APT package index is essentially a database of available packages from the repositories defined in the /etc/apt/sources.list file. To update the local package index with the latest changes made in repositories, type the following:
    https://help.ubuntu.com/8.04/serverguide/C/apt-get.html
    also listed here, https://help.ubuntu.com/community/AptGet/Howto

    From what I have read that command does not actually update the packages, it updates the package index.

    Is there a command that updates the packages?
    Last edited by Shwick2; September 11th, 2011 at 07:36 PM.

  8. #8
    Join Date
    Apr 2010
    Location
    England
    Beans
    3,286

    Re: How to update all packages of Ubuntu via command line?

    Is there a command that updates the packages?
    The upgrade command.

    Code:
    sudo apt-get upgrade
    http://xkcd.com/293/
    There are 10 kinds of people in this world: Those who understand ternary, those who don't, and those who confuse it with binary.

  9. #9
    Join Date
    Jul 2008
    Beans
    117

    Re: How to update all packages of Ubuntu via command line?

    Quote Originally Posted by WorMzy View Post
    The upgrade command.

    Code:
    sudo apt-get upgrade
    Ok, so when the motd told me there were 75 packages to update, I do that with the upgrade command?

    Ok understood.

    I am worried that the apt-get upgrade command will, assuming the definition of the word upgrade, upgrade my system to Ubuntu 11 and beyond.

    I want my system to remain at Ubuntu 10.04LTS.

    Am I in danger of upgrading to the next version of Ubuntu if I use the upgrade command?

  10. #10
    Join Date
    Feb 2010
    Location
    Obscurial Springs
    Beans
    15,209
    Distro
    Ubuntu Budgie Development Release

    Re: How to update all packages of Ubuntu via command line?

    You are correct , it is the sudo apt-get upgrade command , that allows installation of new packages . If there are no packages to install or upgrade you will see a message in the terminal indicating that . If there are packages to install you should get a message indicating that , follow by a would you like to continue question .
    "Our intention creates our reality. "

    Ubuntu Documentation Search: Popular Pages
    Ubuntu: Security Basics
    Ubuntu: Flavors

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •