May be you got a warinning message when you execute do-release-upgrade:
Not enough free disk space
The upgrade has aborted. The upgrade needs a total of
xxx
M free space on disk '/boot'. Please free at least an additionalxxx
M of disk space on '/boot'. Empty your trash and remove temporary packages of former installations using 'sudo apt-get clean'.
Because your /boot partition is filled with old kernels. You can easily remove the old kernels if you know which packages they came in.
First check your current version:
uname -a
Then run the following command:
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'
This command will list all packages that you no longer need. I don't like removing them automatically, I like to be in control when it comes to removing kernels. So for every package listed do the following:
sudo apt-get -y purge some-kernel-package
Where some-kernel-package
can be replaced with one of the packages listed. Just beware that you don't remove the kernel packages that are in current use (as listed by the uname -a
) eg. sudo apt-get purge -y linux-headers-3.8.0-39
etc.
It can be automated further using the xargs command, here's the command to do so:
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
It's done!