Removing old kernels

check the kernel you’re using:

$ uname -r

4.4.0-104-generic

Do NOT delete that kernel!

 

List the old kernels:

$ sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`

linux-image-4.4.0-103-generic
linux-image-extra-4.4.0-103-generic

 

Remove the old kernels one by one:

$ sudo apt-get purge linux-image-3.19.0-25-generic

 

Remove the packages that are not needed anymore:

$ sudo apt-get autoremove

 

Update the grub kernel list:

$ sudo update-grub

 

References :
Safest way to clean up boot partition – Ubuntu 14.04LTS-x64