How to increase space on a Ubuntu boot partition

How can I increase the space on an Ubuntu Boot Partition?

When trying to install programs on my Ubuntu server but the server is not allowing me to do that because the boot partition ‘/dev/sda1’ is full.

/dev/sda1       236M   236M  0M  100% /boot

By default Ubuntu has a small /boot partition. When you have auto updates enabled this can cause some issues as newer kernels are not automatically purged. So, you will need to increase the size of the Ubuntu Boot Partition.

You can add the following to your crontab to run every Sunday night at 11:30PM to clean out old kernels. You can do so by running crontab -e as root and adding the following line at the bottom of that file.


30 23 * * 6 apt-get autoremove

You will also want to reboot every so often so newer kernels are being used and newer kernels are not causing the issues. I would suggest rebooting at your earliest convenience and running


# apt-get autoremove 

to load the newest kernel and delete the older kernels already installed on your server.

However, once rebooted and the autoremove command is done more disk space will be free.

Info

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            990M  4.0K  990M   1% /dev
tmpfs           201M  716K  200M   1% /run
/dev/dm-0        15G  1.9G   12G  14% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none           1001M     0 1001M   0% /run/shm
none            100M     0  100M   0% /run/user
/dev/sda1       236M   72M  152M  32% /boot

$ du -shcx /boot/*
1.2M /boot/abi-3.16.0-30-generic
1.2M /boot/abi-3.16.0-77-generic
169K /boot/config-3.16.0-30-generic
169K /boot/config-3.16.0-77-generic
6.7M /boot/grub
21M /boot/initrd.img-3.16.0-30-generic
21M /boot/initrd.img-3.16.0-77-generic
du: cannot read directory ‘/boot/lost+found’: Permission denied
12K /boot/lost+found
174K /boot/memtest86+.bin
175K /boot/memtest86+.elf
176K /boot/memtest86+_multiboot.bin
3.4M /boot/System.map-3.16.0-30-generic
3.4M /boot/System.map-3.16.0-77-generic
6.1M /boot/vmlinuz-3.16.0-30-generic
6.2M /boot/vmlinuz-3.16.0-77-generic
70M total