Why does Ubuntu need to reboot so often?
Solution 1
I guess you are referring to the latest update.
It included a package called linux-firmware
which is a package that provides firmware used by the Linux kernel drivers so it was a kernel related update.
So to answer your question or better to correct that statement, Ubuntu doesn't need to be restarted on every update but just on updates which are related to kernel stuff.
Solution 2
I'm not sure of all the packages that require a reboot to finish the upgrade, but it is easy to find out why in specific cases.
The warning is triggered by a postinst
script in the package. It creates the file /var/run/reboot-required
The file /var/run/reboot-required.pkgs
will list the packages that require the reboot.
Solution 3
It's worth saying that Linux also needs rebooted after other package updates too.
I'm a big Ubuntu fan but the frequency of package updates (because it's so bleeding edge) is far higher than other distributions.
The extent of which has meant I've dropped Ubuntu on some Servers in favour of Debian.
If anyone else can add to this list of packages that need a reboot it would be appreciated.
I use the superb checkrestart
from debian-goodies
(it uses lsof
) to check when older libraries are still in use.
Updating these packages force a reboot:
Kernel packages (not all, like the meta packages)
libc
dbus
I'm only really concerned with Ubuntu Server and not the Desktop because only rebooting my Servers gives me a headache!
Solution 4
If you don't want to, here is a solution for desktop Linux use: http://www.ksplice.com
Related videos on Youtube
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Admin
Updated on September 18, 2022Comments
-
Admin almost 2 years
Ubuntu seems to require a reboot after almost every apt update, even those that do not include a new kernel version. Why?
-
sazary over 13 yearsI think you can improve the quality of your question by adding the list of packages involved in one of your updates. it makes the discussion more specific.
-
Admin over 13 years@ahm: Yes, I realised that. I noted on the accepted answer that I'll try to keep track of the packages before I complain again.
-
-
Admin over 13 yearsBleeding Edge? Lots of packages from the Debian repositories that I'm interested in are years out-of-date.
-
Nerdfest over 13 yearsIf rebooting that often is a problem for you, a package called ksplice is usable free in Ubuntu. It allows the kernel to be patched on the fly. Very impressive.
-
Admin over 13 years@Nerdfest: I just hibernate or suspend my laptop, so every reboot is a nuisance. I hadn't heard of ksplice -- thanks.
-
Jonathan Ross over 13 yearsI was referring to other distributions too, not just Debian-based flavours. The package versions in Ubuntu are far newer than most others which makes them less proven and more prone to updates.
-
cokeman19 over 13 years@Tim: Read again, he wrote "bleeding edge" in regards to Ubuntu.
-
Admin over 13 years@Adam: Ubuntu uses the Debian repositories AFAIK. s/Debian/Ubuntu/ ín my comment if you want to.
-
cokeman19 over 13 years@Tim: I think he meant the release cycle, but to be honest the answer is a bit difficult to comprehend.
-
user1974 over 13 yearsThis answer is great. Thanks jonathan! Even though you didn't get selected, your answer is more correct. The kernel is not the only package that requests/requires a reboot.
-
Nerdfest over 13 yearsAs a warning, if you hibernate with an upgraded kernel, you will lose your state. I think suspend is okay though.
-
datacarl over 13 yearsYou only need to reboot for the updates to take effect. For users who restart daily, there isn't much sense in a premature reboot.
-
Admin over 13 years@Jonathan Ubuntu isn't bleeding edge; 95% of packages are out-of-date in Maverick, and 70% are out-of-date in Natty. Fedora is bleeding edge, with 70% out-of-date packages in 14 and 55% out-of-date in 15-alpha. Ubuntu just has a fast and consistent release cycle.
-
Admin over 13 years@user1974 System services can be restarted without rebooting (e.g. Apache2, OpenSSH). APT just sets the reboot-required flag (/var/run/reboot-required) for packages that affect system services or libraries.
-
TRiG almost 13 yearsNo, probably not.
-
stephenmyall almost 12 yearsWhile this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes.
-
Vadim Peretokin almost 12 yearsThat's a fair point.
-
jpp1 almost 5 yearsI am not sure this really answers what I find odd: in the past, ubuntu did not require reboots even with kernel updates. I had Ubuntu running for months, installing each and every update. Now, I have to reboot every few days. Is there no way to update and not constantly reboot? Is just doing this safe?