Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A lot of my server software is installed via apt-get and I was wondering if there is a small shell script I can get which will will update all of this software. Also do I need to restart my server afterwards or stop the scripts from running before I run this update?

Is it really as simple as:

apt-get update?
share|improve this question
You could run "apt-get -s upgrade" to simulate only, then grep this output for packages like "linux-image" or the like and then only reboot if such a kernel package is to be updated. – weeheavy Feb 13 '13 at 10:39
up vote 2 down vote accepted

No, apt-get update downloads the package lists from the repositories and "updates" them to get information on the newest versions of packages. You then also need to execute apt-get upgrade to actually install updates.

share|improve this answer

No, restarting the whole sytem would only be necessary if you had upgraded the kernel itself. This would require a reboot in most cases. Everything else, including the stopping and restarting of services, should be handled by the package system.

BTW: You should take a look at cron-apt - this tool downloads upgraded packages at night, which then can be installed manuall with apt-get update.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.