Shortly updating to Ubuntu Trusty (14.04), I noticed the following warning on my console during updates. I finally got around to looking into it deeper and found that many users have seen this too.
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
If you edit the ‘grub’ file, you can comment out the GRUB_HIDDEN_TIMEOUT line by adding a hash in front of it.
sudo vi /etc/default/grub
Verify that the error is fixed by executing the following:
If you are interested, you can also go and look at the updated ‘grub’ file at
NOTE: I’d also seen that the following command could be used, but it was of no use in my testing.
If you update your Ubuntu kernel frequently, eventually you will come to the realization that it is taking a lot of space to keep the old versions around on disk. Another annoyance is that your Grub loader will show a very long list. Sure, you can keep them around forever, should you need to recover them, but for most people it’s safe to remove them. You can manually select and remove the packages in Synaptic, but the easiest way I’ve found is to sun the following script instead. It will remove all old kernel version (except the current one!):
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
Occasionally, you might also want to follow that with the following to clean up other artifacts too…
sudo apt-get autoremove