How to install updates via command line?29 packages can be updated - How?How do I update ubuntu packages...

What is better: yes / no radio, or simple checkbox?

What's the most convenient time of year in the USA to end the world?

Cat is tipping over bed-side lamps during the night

If I delete my router's history can my ISP still provide it to my parents?

Broken patches on a road

How do you funnel food off a cutting board?

Program that converts a number to a letter of the alphabet

Why is "points exist" not an axiom in geometry?

Chess tournament winning streaks

Why is working on the same position for more than 15 years not a red flag?

Would these multi-classing house rules cause unintended problems?

Strange Sign on Lab Door

Notes in a lick that don't fit in the scale associated with the chord

How would a Dictatorship make a country more successful?

How do I say "Brexit" in Latin?

It took me a lot of time to make this, pls like. (YouTube Comments #1)

Quenching swords in dragon blood; why?

What kind of hardware implements Fourier transform?

Parsing a string of key-value pairs as a dictionary

Why do members of Congress in committee hearings ask witnesses the same question multiple times?

Can an insurance company drop you after receiving a bill and refusing to pay?

Check if the digits in the number are in increasing sequence in python

How can I deal with a significant flaw I found in my previous supervisor’s paper?

What to do if authors don't respond to my serious concerns about their paper?



How to install updates via command line?


29 packages can be updated - How?How do I update ubuntu packages 16.04 with Terminal?How to update already installed software via command line?How to update to a specific version of Ubuntu?Can't update, can't install from SC 18.04Question about installing ubuntuUbuntu tells me I have packages to upgrade when I don'tPacman's equivalent in UbuntuWhat's the best tool to install deb packages?Ubuntu 14.04 Suddenly Won't BootHow do I check only security updates from the command-line?29 packages can be updated - How?A question about installing security updatesWhy installing packages without updates fails? Are original packages removed from repositories after update is available?How to only install security updatesCannot install Kernel Security updates in 14.10Best practive for wordpress updatesUpgradable packages seem to appear from nowhere on Ubuntu 14.04 server?Why is the available updates data always stale after upgrading to 14.04?apt update: 5 updates available -> apt full-upgrade: no updates













636















When I log into my web server via SSH I see the information:



88 packages can be updated.
80 updates are security updates


I tried apt-get update then apt-get upgrade but each time I log in I still see the message about updates. How do I install them?










share|improve this question




















  • 1





    Did you try this first: sudo apt-get clean this should clean the cache.

    – user2635584
    Sep 20 '13 at 16:02
















636















When I log into my web server via SSH I see the information:



88 packages can be updated.
80 updates are security updates


I tried apt-get update then apt-get upgrade but each time I log in I still see the message about updates. How do I install them?










share|improve this question




















  • 1





    Did you try this first: sudo apt-get clean this should clean the cache.

    – user2635584
    Sep 20 '13 at 16:02














636












636








636


268






When I log into my web server via SSH I see the information:



88 packages can be updated.
80 updates are security updates


I tried apt-get update then apt-get upgrade but each time I log in I still see the message about updates. How do I install them?










share|improve this question
















When I log into my web server via SSH I see the information:



88 packages can be updated.
80 updates are security updates


I tried apt-get update then apt-get upgrade but each time I log in I still see the message about updates. How do I install them?







command-line apt package-management updates






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 14 '16 at 19:29









muru

1




1










asked Oct 5 '12 at 13:44









MarlinMarlin

3,319395




3,319395








  • 1





    Did you try this first: sudo apt-get clean this should clean the cache.

    – user2635584
    Sep 20 '13 at 16:02














  • 1





    Did you try this first: sudo apt-get clean this should clean the cache.

    – user2635584
    Sep 20 '13 at 16:02








1




1





Did you try this first: sudo apt-get clean this should clean the cache.

– user2635584
Sep 20 '13 at 16:02





Did you try this first: sudo apt-get clean this should clean the cache.

– user2635584
Sep 20 '13 at 16:02










10 Answers
10






active

oldest

votes


















797














Try this:



sudo apt-get update        # Fetches the list of available updates
sudo apt-get upgrade # Strictly upgrades the current packages
sudo apt-get dist-upgrade # Installs updates (new ones)


Documentation about each apt-get option can be found in the the man-pages for apt-get. These are also available by running man apt-get on your computer.






share|improve this answer





















  • 25





    Should I always restart with sudo reboot after it?

    – hellboy
    Apr 9 '15 at 5:47






  • 40





    I also have to run apt-get autoremove or I quickly run out of disk space.

    – Jeff
    Dec 10 '15 at 19:55








  • 1





    I needed to add -y for it to work. Ubuntu 17.10

    – T04435
    Feb 24 '18 at 21:21






  • 1





    @Jeff I was prompted to run sudo apt autoremove, not apt-get autoremove. Are they the same thing?

    – Robert Bernstein
    Dec 22 '18 at 1:59








  • 1





    @RobertBernstein Looks like apt is for newer versions of Linux. itsfoss.com/apt-vs-apt-get-difference

    – Jeff
    Dec 24 '18 at 17:31



















96














Execute all the commands by typing sudo once:



sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'


or



sudo -s -- <<EOF
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
apt-get autoremove -y
apt-get autoclean -y
EOF


or even shorter in a for loop (Thanks @dessert)



sudo bash -c 'for i in update {,dist-}upgrade auto{remove,clean}; do apt-get $i -y; done'





share|improve this answer





















  • 8





    This is a very thorough and complete way to upgrade one's server and in my view, the best of the available solutions in this thread. Thanks, @Benny!

    – unrivaledcreations
    Jul 24 '17 at 3:00



















89














This is normal behavior.



The message you see on login has been appended to the server status 'Message-Of-The-Day', which is only updated each calendar day (or on server boot / startup). Have a look at the contents, using



cat /etc/motd


Still seeing the same updates available, after running



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


is to be expected. If you then re-run this command you will only be prompted for any further updates if even further (newer) updates have been released.






share|improve this answer


























  • I'm noticing that any file changes in the whole system doesn't show until the next calendar day, is there a way for like "refresh" to start seeing changes right away?

    – aljuaid86
    Feb 11 '16 at 7:24











  • Do you mean updates for the content of Message-Of-The-Day, or not getting what you want after running sudo apt-get update && sudo apt-get upgrade ?

    – david6
    Feb 11 '16 at 7:35








  • 3





    This is no longer true on 16.04. After "apt-get dist-upgrade" and a reboot I see "0 packages can be upgraded".

    – Bogdan Calmac
    Jun 24 '16 at 18:27






  • 1





    The '.. or on server reboot ..' statement above does cover that.

    – david6
    Jun 24 '16 at 20:29






  • 3





    cat: /etc/motd: No such file or directory

    – xApple
    Jan 26 '17 at 19:17



















11














Once your log into your server, run the command below.



sudo apt-get upgrade


It should do the trick. Maybe you just need to restart your server.






share|improve this answer





















  • 3





    Thank you for your answer but I did try sudo apt-get upgrade. Restarting the server is out of the question because I have sites on it.

    – Marlin
    Oct 5 '12 at 14:04






  • 3





    if you installed an update that directly affects the kernel or it's a driver update or it's a critical security update, you need to restart the server.

    – Evandro Silva
    Oct 5 '12 at 14:11











  • Maybe you should consider an error 503 for a minute. Do you know what kind of update this is ?

    – NorTicUs
    Oct 5 '12 at 15:09






  • 1





    How can you give a 503 if the server is offline?

    – mcont
    Jan 12 '15 at 13:58



















8














In my case, I had an incorrect or not accessible URL in /etc/apt/sources.list.
After removing this URL, I was able to update all packages successfully.



Commands:



sudo vi /etc/apt/sources.list
sudo apt-get update && sudo apt-get upgrade





share|improve this answer

































    7














    My (really late, I like necromancer badges :-) ) solution:





    1. Install wajig (once):



      sudo apt-get install wajig 



    2. When you want to update/upgrade fully your system



      wajig dailyupgrade


      (it will ask for password if needed, and do all the update, upgrade, dist-upgrade, and autoremove steps for you).








    share|improve this answer

































      4














      You may also need to do this -



      sudo touch /etc/motd.tail


      From - Ubuntu tells me I have packages to upgrade when I don't



      It worked for me on 14.04






      share|improve this answer

































        1














        this script is handy to automate updates including removing unneeded packages and performing a reboot only if the OS wants one



        remote_user=usernamehere
        remote_host=example.com

        ssh -A -n -o StrictHostKeyChecking=no ${remote_user}@${remote_host} &&
        sudo apt-get update &&
        sudo apt-get -f install -y &&
        sudo apt-get -o Dpkg::Options::="--force-confnew" -yy dist-upgrade -y &&
        sudo apt-get autoremove -y &&
        [ -f /var/run/reboot-required ] &&
        echo "sudo reboot now" &&
        sudo reboot now


        to run on your local box just leave off that first line doing the ssh



        here is an alias I save in ~/.bashrc



        alias doit='echo; kill $( ps -eafww|grep update-manager|grep -v grep | grep update-manager | tr -s " " |cut -d" "  -f2 ) > /dev/null 2>&1;  echo "sudo apt-get update && sudo apt-get dist-upgrade &&  [ -f /var/run/reboot-required ] && echo && echo reboot required && echo";echo;sudo apt-get update && sudo apt-get dist-upgrade &&  [ -f /var/run/reboot-required ] && echo && echo reboot required && echo '


        then on terminal I just issue doit






        share|improve this answer

































          0














          If you run apt-get update again after apt-get upgrade has been concluded, those messages at ssh login should go away.






          share|improve this answer































            0














            Ran updates on server 18.04 LTS from the command line last night. (actually used aptitude). The system restarted automatically. It's a production server. How do I prevent that behavior. I stopped using Microsoft products because of that behavior. A server should restart when I want it to restart, not when canonical or redhat (systemd) thinks it should.



            How can I prevent that behavior in the future? Really, really annoyed.






            share|improve this answer






















              protected by Community Nov 9 '14 at 16:48



              Thank you for your interest in this question.
              Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



              Would you like to answer one of these unanswered questions instead?














              10 Answers
              10






              active

              oldest

              votes








              10 Answers
              10






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              797














              Try this:



              sudo apt-get update        # Fetches the list of available updates
              sudo apt-get upgrade # Strictly upgrades the current packages
              sudo apt-get dist-upgrade # Installs updates (new ones)


              Documentation about each apt-get option can be found in the the man-pages for apt-get. These are also available by running man apt-get on your computer.






              share|improve this answer





















              • 25





                Should I always restart with sudo reboot after it?

                – hellboy
                Apr 9 '15 at 5:47






              • 40





                I also have to run apt-get autoremove or I quickly run out of disk space.

                – Jeff
                Dec 10 '15 at 19:55








              • 1





                I needed to add -y for it to work. Ubuntu 17.10

                – T04435
                Feb 24 '18 at 21:21






              • 1





                @Jeff I was prompted to run sudo apt autoremove, not apt-get autoremove. Are they the same thing?

                – Robert Bernstein
                Dec 22 '18 at 1:59








              • 1





                @RobertBernstein Looks like apt is for newer versions of Linux. itsfoss.com/apt-vs-apt-get-difference

                – Jeff
                Dec 24 '18 at 17:31
















              797














              Try this:



              sudo apt-get update        # Fetches the list of available updates
              sudo apt-get upgrade # Strictly upgrades the current packages
              sudo apt-get dist-upgrade # Installs updates (new ones)


              Documentation about each apt-get option can be found in the the man-pages for apt-get. These are also available by running man apt-get on your computer.






              share|improve this answer





















              • 25





                Should I always restart with sudo reboot after it?

                – hellboy
                Apr 9 '15 at 5:47






              • 40





                I also have to run apt-get autoremove or I quickly run out of disk space.

                – Jeff
                Dec 10 '15 at 19:55








              • 1





                I needed to add -y for it to work. Ubuntu 17.10

                – T04435
                Feb 24 '18 at 21:21






              • 1





                @Jeff I was prompted to run sudo apt autoremove, not apt-get autoremove. Are they the same thing?

                – Robert Bernstein
                Dec 22 '18 at 1:59








              • 1





                @RobertBernstein Looks like apt is for newer versions of Linux. itsfoss.com/apt-vs-apt-get-difference

                – Jeff
                Dec 24 '18 at 17:31














              797












              797








              797







              Try this:



              sudo apt-get update        # Fetches the list of available updates
              sudo apt-get upgrade # Strictly upgrades the current packages
              sudo apt-get dist-upgrade # Installs updates (new ones)


              Documentation about each apt-get option can be found in the the man-pages for apt-get. These are also available by running man apt-get on your computer.






              share|improve this answer















              Try this:



              sudo apt-get update        # Fetches the list of available updates
              sudo apt-get upgrade # Strictly upgrades the current packages
              sudo apt-get dist-upgrade # Installs updates (new ones)


              Documentation about each apt-get option can be found in the the man-pages for apt-get. These are also available by running man apt-get on your computer.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Dec 30 '17 at 22:58









              vidarlo

              10.8k52748




              10.8k52748










              answered Oct 5 '12 at 14:05









              SirCharloSirCharlo

              30.1k75976




              30.1k75976








              • 25





                Should I always restart with sudo reboot after it?

                – hellboy
                Apr 9 '15 at 5:47






              • 40





                I also have to run apt-get autoremove or I quickly run out of disk space.

                – Jeff
                Dec 10 '15 at 19:55








              • 1





                I needed to add -y for it to work. Ubuntu 17.10

                – T04435
                Feb 24 '18 at 21:21






              • 1





                @Jeff I was prompted to run sudo apt autoremove, not apt-get autoremove. Are they the same thing?

                – Robert Bernstein
                Dec 22 '18 at 1:59








              • 1





                @RobertBernstein Looks like apt is for newer versions of Linux. itsfoss.com/apt-vs-apt-get-difference

                – Jeff
                Dec 24 '18 at 17:31














              • 25





                Should I always restart with sudo reboot after it?

                – hellboy
                Apr 9 '15 at 5:47






              • 40





                I also have to run apt-get autoremove or I quickly run out of disk space.

                – Jeff
                Dec 10 '15 at 19:55








              • 1





                I needed to add -y for it to work. Ubuntu 17.10

                – T04435
                Feb 24 '18 at 21:21






              • 1





                @Jeff I was prompted to run sudo apt autoremove, not apt-get autoremove. Are they the same thing?

                – Robert Bernstein
                Dec 22 '18 at 1:59








              • 1





                @RobertBernstein Looks like apt is for newer versions of Linux. itsfoss.com/apt-vs-apt-get-difference

                – Jeff
                Dec 24 '18 at 17:31








              25




              25





              Should I always restart with sudo reboot after it?

              – hellboy
              Apr 9 '15 at 5:47





              Should I always restart with sudo reboot after it?

              – hellboy
              Apr 9 '15 at 5:47




              40




              40





              I also have to run apt-get autoremove or I quickly run out of disk space.

              – Jeff
              Dec 10 '15 at 19:55







              I also have to run apt-get autoremove or I quickly run out of disk space.

              – Jeff
              Dec 10 '15 at 19:55






              1




              1





              I needed to add -y for it to work. Ubuntu 17.10

              – T04435
              Feb 24 '18 at 21:21





              I needed to add -y for it to work. Ubuntu 17.10

              – T04435
              Feb 24 '18 at 21:21




              1




              1





              @Jeff I was prompted to run sudo apt autoremove, not apt-get autoremove. Are they the same thing?

              – Robert Bernstein
              Dec 22 '18 at 1:59







              @Jeff I was prompted to run sudo apt autoremove, not apt-get autoremove. Are they the same thing?

              – Robert Bernstein
              Dec 22 '18 at 1:59






              1




              1





              @RobertBernstein Looks like apt is for newer versions of Linux. itsfoss.com/apt-vs-apt-get-difference

              – Jeff
              Dec 24 '18 at 17:31





              @RobertBernstein Looks like apt is for newer versions of Linux. itsfoss.com/apt-vs-apt-get-difference

              – Jeff
              Dec 24 '18 at 17:31













              96














              Execute all the commands by typing sudo once:



              sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'


              or



              sudo -s -- <<EOF
              apt-get update
              apt-get upgrade -y
              apt-get dist-upgrade -y
              apt-get autoremove -y
              apt-get autoclean -y
              EOF


              or even shorter in a for loop (Thanks @dessert)



              sudo bash -c 'for i in update {,dist-}upgrade auto{remove,clean}; do apt-get $i -y; done'





              share|improve this answer





















              • 8





                This is a very thorough and complete way to upgrade one's server and in my view, the best of the available solutions in this thread. Thanks, @Benny!

                – unrivaledcreations
                Jul 24 '17 at 3:00
















              96














              Execute all the commands by typing sudo once:



              sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'


              or



              sudo -s -- <<EOF
              apt-get update
              apt-get upgrade -y
              apt-get dist-upgrade -y
              apt-get autoremove -y
              apt-get autoclean -y
              EOF


              or even shorter in a for loop (Thanks @dessert)



              sudo bash -c 'for i in update {,dist-}upgrade auto{remove,clean}; do apt-get $i -y; done'





              share|improve this answer





















              • 8





                This is a very thorough and complete way to upgrade one's server and in my view, the best of the available solutions in this thread. Thanks, @Benny!

                – unrivaledcreations
                Jul 24 '17 at 3:00














              96












              96








              96







              Execute all the commands by typing sudo once:



              sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'


              or



              sudo -s -- <<EOF
              apt-get update
              apt-get upgrade -y
              apt-get dist-upgrade -y
              apt-get autoremove -y
              apt-get autoclean -y
              EOF


              or even shorter in a for loop (Thanks @dessert)



              sudo bash -c 'for i in update {,dist-}upgrade auto{remove,clean}; do apt-get $i -y; done'





              share|improve this answer















              Execute all the commands by typing sudo once:



              sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'


              or



              sudo -s -- <<EOF
              apt-get update
              apt-get upgrade -y
              apt-get dist-upgrade -y
              apt-get autoremove -y
              apt-get autoclean -y
              EOF


              or even shorter in a for loop (Thanks @dessert)



              sudo bash -c 'for i in update {,dist-}upgrade auto{remove,clean}; do apt-get $i -y; done'






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jan 15 at 11:39

























              answered Nov 8 '16 at 9:28









              BennyBenny

              3,26211026




              3,26211026








              • 8





                This is a very thorough and complete way to upgrade one's server and in my view, the best of the available solutions in this thread. Thanks, @Benny!

                – unrivaledcreations
                Jul 24 '17 at 3:00














              • 8





                This is a very thorough and complete way to upgrade one's server and in my view, the best of the available solutions in this thread. Thanks, @Benny!

                – unrivaledcreations
                Jul 24 '17 at 3:00








              8




              8





              This is a very thorough and complete way to upgrade one's server and in my view, the best of the available solutions in this thread. Thanks, @Benny!

              – unrivaledcreations
              Jul 24 '17 at 3:00





              This is a very thorough and complete way to upgrade one's server and in my view, the best of the available solutions in this thread. Thanks, @Benny!

              – unrivaledcreations
              Jul 24 '17 at 3:00











              89














              This is normal behavior.



              The message you see on login has been appended to the server status 'Message-Of-The-Day', which is only updated each calendar day (or on server boot / startup). Have a look at the contents, using



              cat /etc/motd


              Still seeing the same updates available, after running



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


              is to be expected. If you then re-run this command you will only be prompted for any further updates if even further (newer) updates have been released.






              share|improve this answer


























              • I'm noticing that any file changes in the whole system doesn't show until the next calendar day, is there a way for like "refresh" to start seeing changes right away?

                – aljuaid86
                Feb 11 '16 at 7:24











              • Do you mean updates for the content of Message-Of-The-Day, or not getting what you want after running sudo apt-get update && sudo apt-get upgrade ?

                – david6
                Feb 11 '16 at 7:35








              • 3





                This is no longer true on 16.04. After "apt-get dist-upgrade" and a reboot I see "0 packages can be upgraded".

                – Bogdan Calmac
                Jun 24 '16 at 18:27






              • 1





                The '.. or on server reboot ..' statement above does cover that.

                – david6
                Jun 24 '16 at 20:29






              • 3





                cat: /etc/motd: No such file or directory

                – xApple
                Jan 26 '17 at 19:17
















              89














              This is normal behavior.



              The message you see on login has been appended to the server status 'Message-Of-The-Day', which is only updated each calendar day (or on server boot / startup). Have a look at the contents, using



              cat /etc/motd


              Still seeing the same updates available, after running



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


              is to be expected. If you then re-run this command you will only be prompted for any further updates if even further (newer) updates have been released.






              share|improve this answer


























              • I'm noticing that any file changes in the whole system doesn't show until the next calendar day, is there a way for like "refresh" to start seeing changes right away?

                – aljuaid86
                Feb 11 '16 at 7:24











              • Do you mean updates for the content of Message-Of-The-Day, or not getting what you want after running sudo apt-get update && sudo apt-get upgrade ?

                – david6
                Feb 11 '16 at 7:35








              • 3





                This is no longer true on 16.04. After "apt-get dist-upgrade" and a reboot I see "0 packages can be upgraded".

                – Bogdan Calmac
                Jun 24 '16 at 18:27






              • 1





                The '.. or on server reboot ..' statement above does cover that.

                – david6
                Jun 24 '16 at 20:29






              • 3





                cat: /etc/motd: No such file or directory

                – xApple
                Jan 26 '17 at 19:17














              89












              89








              89







              This is normal behavior.



              The message you see on login has been appended to the server status 'Message-Of-The-Day', which is only updated each calendar day (or on server boot / startup). Have a look at the contents, using



              cat /etc/motd


              Still seeing the same updates available, after running



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


              is to be expected. If you then re-run this command you will only be prompted for any further updates if even further (newer) updates have been released.






              share|improve this answer















              This is normal behavior.



              The message you see on login has been appended to the server status 'Message-Of-The-Day', which is only updated each calendar day (or on server boot / startup). Have a look at the contents, using



              cat /etc/motd


              Still seeing the same updates available, after running



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


              is to be expected. If you then re-run this command you will only be prompted for any further updates if even further (newer) updates have been released.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Jun 16 '15 at 13:50









              Gottlieb Notschnabel

              158111




              158111










              answered Oct 5 '12 at 20:26









              david6david6

              13.7k43145




              13.7k43145













              • I'm noticing that any file changes in the whole system doesn't show until the next calendar day, is there a way for like "refresh" to start seeing changes right away?

                – aljuaid86
                Feb 11 '16 at 7:24











              • Do you mean updates for the content of Message-Of-The-Day, or not getting what you want after running sudo apt-get update && sudo apt-get upgrade ?

                – david6
                Feb 11 '16 at 7:35








              • 3





                This is no longer true on 16.04. After "apt-get dist-upgrade" and a reboot I see "0 packages can be upgraded".

                – Bogdan Calmac
                Jun 24 '16 at 18:27






              • 1





                The '.. or on server reboot ..' statement above does cover that.

                – david6
                Jun 24 '16 at 20:29






              • 3





                cat: /etc/motd: No such file or directory

                – xApple
                Jan 26 '17 at 19:17



















              • I'm noticing that any file changes in the whole system doesn't show until the next calendar day, is there a way for like "refresh" to start seeing changes right away?

                – aljuaid86
                Feb 11 '16 at 7:24











              • Do you mean updates for the content of Message-Of-The-Day, or not getting what you want after running sudo apt-get update && sudo apt-get upgrade ?

                – david6
                Feb 11 '16 at 7:35








              • 3





                This is no longer true on 16.04. After "apt-get dist-upgrade" and a reboot I see "0 packages can be upgraded".

                – Bogdan Calmac
                Jun 24 '16 at 18:27






              • 1





                The '.. or on server reboot ..' statement above does cover that.

                – david6
                Jun 24 '16 at 20:29






              • 3





                cat: /etc/motd: No such file or directory

                – xApple
                Jan 26 '17 at 19:17

















              I'm noticing that any file changes in the whole system doesn't show until the next calendar day, is there a way for like "refresh" to start seeing changes right away?

              – aljuaid86
              Feb 11 '16 at 7:24





              I'm noticing that any file changes in the whole system doesn't show until the next calendar day, is there a way for like "refresh" to start seeing changes right away?

              – aljuaid86
              Feb 11 '16 at 7:24













              Do you mean updates for the content of Message-Of-The-Day, or not getting what you want after running sudo apt-get update && sudo apt-get upgrade ?

              – david6
              Feb 11 '16 at 7:35







              Do you mean updates for the content of Message-Of-The-Day, or not getting what you want after running sudo apt-get update && sudo apt-get upgrade ?

              – david6
              Feb 11 '16 at 7:35






              3




              3





              This is no longer true on 16.04. After "apt-get dist-upgrade" and a reboot I see "0 packages can be upgraded".

              – Bogdan Calmac
              Jun 24 '16 at 18:27





              This is no longer true on 16.04. After "apt-get dist-upgrade" and a reboot I see "0 packages can be upgraded".

              – Bogdan Calmac
              Jun 24 '16 at 18:27




              1




              1





              The '.. or on server reboot ..' statement above does cover that.

              – david6
              Jun 24 '16 at 20:29





              The '.. or on server reboot ..' statement above does cover that.

              – david6
              Jun 24 '16 at 20:29




              3




              3





              cat: /etc/motd: No such file or directory

              – xApple
              Jan 26 '17 at 19:17





              cat: /etc/motd: No such file or directory

              – xApple
              Jan 26 '17 at 19:17











              11














              Once your log into your server, run the command below.



              sudo apt-get upgrade


              It should do the trick. Maybe you just need to restart your server.






              share|improve this answer





















              • 3





                Thank you for your answer but I did try sudo apt-get upgrade. Restarting the server is out of the question because I have sites on it.

                – Marlin
                Oct 5 '12 at 14:04






              • 3





                if you installed an update that directly affects the kernel or it's a driver update or it's a critical security update, you need to restart the server.

                – Evandro Silva
                Oct 5 '12 at 14:11











              • Maybe you should consider an error 503 for a minute. Do you know what kind of update this is ?

                – NorTicUs
                Oct 5 '12 at 15:09






              • 1





                How can you give a 503 if the server is offline?

                – mcont
                Jan 12 '15 at 13:58
















              11














              Once your log into your server, run the command below.



              sudo apt-get upgrade


              It should do the trick. Maybe you just need to restart your server.






              share|improve this answer





















              • 3





                Thank you for your answer but I did try sudo apt-get upgrade. Restarting the server is out of the question because I have sites on it.

                – Marlin
                Oct 5 '12 at 14:04






              • 3





                if you installed an update that directly affects the kernel or it's a driver update or it's a critical security update, you need to restart the server.

                – Evandro Silva
                Oct 5 '12 at 14:11











              • Maybe you should consider an error 503 for a minute. Do you know what kind of update this is ?

                – NorTicUs
                Oct 5 '12 at 15:09






              • 1





                How can you give a 503 if the server is offline?

                – mcont
                Jan 12 '15 at 13:58














              11












              11








              11







              Once your log into your server, run the command below.



              sudo apt-get upgrade


              It should do the trick. Maybe you just need to restart your server.






              share|improve this answer















              Once your log into your server, run the command below.



              sudo apt-get upgrade


              It should do the trick. Maybe you just need to restart your server.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Sep 7 '14 at 22:31


























              community wiki





              5 revs, 4 users 45%
              Mitch









              • 3





                Thank you for your answer but I did try sudo apt-get upgrade. Restarting the server is out of the question because I have sites on it.

                – Marlin
                Oct 5 '12 at 14:04






              • 3





                if you installed an update that directly affects the kernel or it's a driver update or it's a critical security update, you need to restart the server.

                – Evandro Silva
                Oct 5 '12 at 14:11











              • Maybe you should consider an error 503 for a minute. Do you know what kind of update this is ?

                – NorTicUs
                Oct 5 '12 at 15:09






              • 1





                How can you give a 503 if the server is offline?

                – mcont
                Jan 12 '15 at 13:58














              • 3





                Thank you for your answer but I did try sudo apt-get upgrade. Restarting the server is out of the question because I have sites on it.

                – Marlin
                Oct 5 '12 at 14:04






              • 3





                if you installed an update that directly affects the kernel or it's a driver update or it's a critical security update, you need to restart the server.

                – Evandro Silva
                Oct 5 '12 at 14:11











              • Maybe you should consider an error 503 for a minute. Do you know what kind of update this is ?

                – NorTicUs
                Oct 5 '12 at 15:09






              • 1





                How can you give a 503 if the server is offline?

                – mcont
                Jan 12 '15 at 13:58








              3




              3





              Thank you for your answer but I did try sudo apt-get upgrade. Restarting the server is out of the question because I have sites on it.

              – Marlin
              Oct 5 '12 at 14:04





              Thank you for your answer but I did try sudo apt-get upgrade. Restarting the server is out of the question because I have sites on it.

              – Marlin
              Oct 5 '12 at 14:04




              3




              3





              if you installed an update that directly affects the kernel or it's a driver update or it's a critical security update, you need to restart the server.

              – Evandro Silva
              Oct 5 '12 at 14:11





              if you installed an update that directly affects the kernel or it's a driver update or it's a critical security update, you need to restart the server.

              – Evandro Silva
              Oct 5 '12 at 14:11













              Maybe you should consider an error 503 for a minute. Do you know what kind of update this is ?

              – NorTicUs
              Oct 5 '12 at 15:09





              Maybe you should consider an error 503 for a minute. Do you know what kind of update this is ?

              – NorTicUs
              Oct 5 '12 at 15:09




              1




              1





              How can you give a 503 if the server is offline?

              – mcont
              Jan 12 '15 at 13:58





              How can you give a 503 if the server is offline?

              – mcont
              Jan 12 '15 at 13:58











              8














              In my case, I had an incorrect or not accessible URL in /etc/apt/sources.list.
              After removing this URL, I was able to update all packages successfully.



              Commands:



              sudo vi /etc/apt/sources.list
              sudo apt-get update && sudo apt-get upgrade





              share|improve this answer






























                8














                In my case, I had an incorrect or not accessible URL in /etc/apt/sources.list.
                After removing this URL, I was able to update all packages successfully.



                Commands:



                sudo vi /etc/apt/sources.list
                sudo apt-get update && sudo apt-get upgrade





                share|improve this answer




























                  8












                  8








                  8







                  In my case, I had an incorrect or not accessible URL in /etc/apt/sources.list.
                  After removing this URL, I was able to update all packages successfully.



                  Commands:



                  sudo vi /etc/apt/sources.list
                  sudo apt-get update && sudo apt-get upgrade





                  share|improve this answer















                  In my case, I had an incorrect or not accessible URL in /etc/apt/sources.list.
                  After removing this URL, I was able to update all packages successfully.



                  Commands:



                  sudo vi /etc/apt/sources.list
                  sudo apt-get update && sudo apt-get upgrade






                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Sep 7 '14 at 22:55









                  Peter Mortensen

                  1,03721016




                  1,03721016










                  answered Apr 20 '13 at 9:29









                  burtsevygburtsevyg

                  24027




                  24027























                      7














                      My (really late, I like necromancer badges :-) ) solution:





                      1. Install wajig (once):



                        sudo apt-get install wajig 



                      2. When you want to update/upgrade fully your system



                        wajig dailyupgrade


                        (it will ask for password if needed, and do all the update, upgrade, dist-upgrade, and autoremove steps for you).








                      share|improve this answer






























                        7














                        My (really late, I like necromancer badges :-) ) solution:





                        1. Install wajig (once):



                          sudo apt-get install wajig 



                        2. When you want to update/upgrade fully your system



                          wajig dailyupgrade


                          (it will ask for password if needed, and do all the update, upgrade, dist-upgrade, and autoremove steps for you).








                        share|improve this answer




























                          7












                          7








                          7







                          My (really late, I like necromancer badges :-) ) solution:





                          1. Install wajig (once):



                            sudo apt-get install wajig 



                          2. When you want to update/upgrade fully your system



                            wajig dailyupgrade


                            (it will ask for password if needed, and do all the update, upgrade, dist-upgrade, and autoremove steps for you).








                          share|improve this answer















                          My (really late, I like necromancer badges :-) ) solution:





                          1. Install wajig (once):



                            sudo apt-get install wajig 



                          2. When you want to update/upgrade fully your system



                            wajig dailyupgrade


                            (it will ask for password if needed, and do all the update, upgrade, dist-upgrade, and autoremove steps for you).









                          share|improve this answer














                          share|improve this answer



                          share|improve this answer








                          edited Apr 19 '16 at 16:39

























                          answered Aug 26 '15 at 7:47









                          RmanoRmano

                          25.4k879147




                          25.4k879147























                              4














                              You may also need to do this -



                              sudo touch /etc/motd.tail


                              From - Ubuntu tells me I have packages to upgrade when I don't



                              It worked for me on 14.04






                              share|improve this answer






























                                4














                                You may also need to do this -



                                sudo touch /etc/motd.tail


                                From - Ubuntu tells me I have packages to upgrade when I don't



                                It worked for me on 14.04






                                share|improve this answer




























                                  4












                                  4








                                  4







                                  You may also need to do this -



                                  sudo touch /etc/motd.tail


                                  From - Ubuntu tells me I have packages to upgrade when I don't



                                  It worked for me on 14.04






                                  share|improve this answer















                                  You may also need to do this -



                                  sudo touch /etc/motd.tail


                                  From - Ubuntu tells me I have packages to upgrade when I don't



                                  It worked for me on 14.04







                                  share|improve this answer














                                  share|improve this answer



                                  share|improve this answer








                                  edited Apr 13 '17 at 12:25









                                  Community

                                  1




                                  1










                                  answered Oct 12 '14 at 2:22









                                  John BehanJohn Behan

                                  1468




                                  1468























                                      1














                                      this script is handy to automate updates including removing unneeded packages and performing a reboot only if the OS wants one



                                      remote_user=usernamehere
                                      remote_host=example.com

                                      ssh -A -n -o StrictHostKeyChecking=no ${remote_user}@${remote_host} &&
                                      sudo apt-get update &&
                                      sudo apt-get -f install -y &&
                                      sudo apt-get -o Dpkg::Options::="--force-confnew" -yy dist-upgrade -y &&
                                      sudo apt-get autoremove -y &&
                                      [ -f /var/run/reboot-required ] &&
                                      echo "sudo reboot now" &&
                                      sudo reboot now


                                      to run on your local box just leave off that first line doing the ssh



                                      here is an alias I save in ~/.bashrc



                                      alias doit='echo; kill $( ps -eafww|grep update-manager|grep -v grep | grep update-manager | tr -s " " |cut -d" "  -f2 ) > /dev/null 2>&1;  echo "sudo apt-get update && sudo apt-get dist-upgrade &&  [ -f /var/run/reboot-required ] && echo && echo reboot required && echo";echo;sudo apt-get update && sudo apt-get dist-upgrade &&  [ -f /var/run/reboot-required ] && echo && echo reboot required && echo '


                                      then on terminal I just issue doit






                                      share|improve this answer






























                                        1














                                        this script is handy to automate updates including removing unneeded packages and performing a reboot only if the OS wants one



                                        remote_user=usernamehere
                                        remote_host=example.com

                                        ssh -A -n -o StrictHostKeyChecking=no ${remote_user}@${remote_host} &&
                                        sudo apt-get update &&
                                        sudo apt-get -f install -y &&
                                        sudo apt-get -o Dpkg::Options::="--force-confnew" -yy dist-upgrade -y &&
                                        sudo apt-get autoremove -y &&
                                        [ -f /var/run/reboot-required ] &&
                                        echo "sudo reboot now" &&
                                        sudo reboot now


                                        to run on your local box just leave off that first line doing the ssh



                                        here is an alias I save in ~/.bashrc



                                        alias doit='echo; kill $( ps -eafww|grep update-manager|grep -v grep | grep update-manager | tr -s " " |cut -d" "  -f2 ) > /dev/null 2>&1;  echo "sudo apt-get update && sudo apt-get dist-upgrade &&  [ -f /var/run/reboot-required ] && echo && echo reboot required && echo";echo;sudo apt-get update && sudo apt-get dist-upgrade &&  [ -f /var/run/reboot-required ] && echo && echo reboot required && echo '


                                        then on terminal I just issue doit






                                        share|improve this answer




























                                          1












                                          1








                                          1







                                          this script is handy to automate updates including removing unneeded packages and performing a reboot only if the OS wants one



                                          remote_user=usernamehere
                                          remote_host=example.com

                                          ssh -A -n -o StrictHostKeyChecking=no ${remote_user}@${remote_host} &&
                                          sudo apt-get update &&
                                          sudo apt-get -f install -y &&
                                          sudo apt-get -o Dpkg::Options::="--force-confnew" -yy dist-upgrade -y &&
                                          sudo apt-get autoremove -y &&
                                          [ -f /var/run/reboot-required ] &&
                                          echo "sudo reboot now" &&
                                          sudo reboot now


                                          to run on your local box just leave off that first line doing the ssh



                                          here is an alias I save in ~/.bashrc



                                          alias doit='echo; kill $( ps -eafww|grep update-manager|grep -v grep | grep update-manager | tr -s " " |cut -d" "  -f2 ) > /dev/null 2>&1;  echo "sudo apt-get update && sudo apt-get dist-upgrade &&  [ -f /var/run/reboot-required ] && echo && echo reboot required && echo";echo;sudo apt-get update && sudo apt-get dist-upgrade &&  [ -f /var/run/reboot-required ] && echo && echo reboot required && echo '


                                          then on terminal I just issue doit






                                          share|improve this answer















                                          this script is handy to automate updates including removing unneeded packages and performing a reboot only if the OS wants one



                                          remote_user=usernamehere
                                          remote_host=example.com

                                          ssh -A -n -o StrictHostKeyChecking=no ${remote_user}@${remote_host} &&
                                          sudo apt-get update &&
                                          sudo apt-get -f install -y &&
                                          sudo apt-get -o Dpkg::Options::="--force-confnew" -yy dist-upgrade -y &&
                                          sudo apt-get autoremove -y &&
                                          [ -f /var/run/reboot-required ] &&
                                          echo "sudo reboot now" &&
                                          sudo reboot now


                                          to run on your local box just leave off that first line doing the ssh



                                          here is an alias I save in ~/.bashrc



                                          alias doit='echo; kill $( ps -eafww|grep update-manager|grep -v grep | grep update-manager | tr -s " " |cut -d" "  -f2 ) > /dev/null 2>&1;  echo "sudo apt-get update && sudo apt-get dist-upgrade &&  [ -f /var/run/reboot-required ] && echo && echo reboot required && echo";echo;sudo apt-get update && sudo apt-get dist-upgrade &&  [ -f /var/run/reboot-required ] && echo && echo reboot required && echo '


                                          then on terminal I just issue doit







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited Apr 11 '18 at 22:04

























                                          answered Dec 16 '17 at 18:47









                                          Scott StenslandScott Stensland

                                          4,95242242




                                          4,95242242























                                              0














                                              If you run apt-get update again after apt-get upgrade has been concluded, those messages at ssh login should go away.






                                              share|improve this answer




























                                                0














                                                If you run apt-get update again after apt-get upgrade has been concluded, those messages at ssh login should go away.






                                                share|improve this answer


























                                                  0












                                                  0








                                                  0







                                                  If you run apt-get update again after apt-get upgrade has been concluded, those messages at ssh login should go away.






                                                  share|improve this answer













                                                  If you run apt-get update again after apt-get upgrade has been concluded, those messages at ssh login should go away.







                                                  share|improve this answer












                                                  share|improve this answer



                                                  share|improve this answer










                                                  answered Aug 13 '14 at 11:27









                                                  Francisco LuzFrancisco Luz

                                                  1012




                                                  1012























                                                      0














                                                      Ran updates on server 18.04 LTS from the command line last night. (actually used aptitude). The system restarted automatically. It's a production server. How do I prevent that behavior. I stopped using Microsoft products because of that behavior. A server should restart when I want it to restart, not when canonical or redhat (systemd) thinks it should.



                                                      How can I prevent that behavior in the future? Really, really annoyed.






                                                      share|improve this answer




























                                                        0














                                                        Ran updates on server 18.04 LTS from the command line last night. (actually used aptitude). The system restarted automatically. It's a production server. How do I prevent that behavior. I stopped using Microsoft products because of that behavior. A server should restart when I want it to restart, not when canonical or redhat (systemd) thinks it should.



                                                        How can I prevent that behavior in the future? Really, really annoyed.






                                                        share|improve this answer


























                                                          0












                                                          0








                                                          0







                                                          Ran updates on server 18.04 LTS from the command line last night. (actually used aptitude). The system restarted automatically. It's a production server. How do I prevent that behavior. I stopped using Microsoft products because of that behavior. A server should restart when I want it to restart, not when canonical or redhat (systemd) thinks it should.



                                                          How can I prevent that behavior in the future? Really, really annoyed.






                                                          share|improve this answer













                                                          Ran updates on server 18.04 LTS from the command line last night. (actually used aptitude). The system restarted automatically. It's a production server. How do I prevent that behavior. I stopped using Microsoft products because of that behavior. A server should restart when I want it to restart, not when canonical or redhat (systemd) thinks it should.



                                                          How can I prevent that behavior in the future? Really, really annoyed.







                                                          share|improve this answer












                                                          share|improve this answer



                                                          share|improve this answer










                                                          answered 13 mins ago









                                                          Curtis MaurandCurtis Maurand

                                                          172




                                                          172

















                                                              protected by Community Nov 9 '14 at 16:48



                                                              Thank you for your interest in this question.
                                                              Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                              Would you like to answer one of these unanswered questions instead?



                                                              Popular posts from this blog

                                                              Unit packagekit.service is masked Announcing the arrival of Valued Associate #679: Cesar...