From [[https://gist.github.com/ipbastola/2760cfc28be62a5ee10036851c654600|Github]]\\
**1. Check the current kernel version**\\
''$ uname -r''\\ 

It will shows the list like below:\\
''3.19.0-64-generic''\\

**2. Remove the OLD kernels**\\
 - a. List the old kernel\\
<code>sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`''</code>

You will get the list of images something like below:

''linux-image-3.19.0-25-generic''\\
''linux-image-3.19.0-56-generic''\\

 - b. Now its time to remove old kernel one by one as\\
''$ sudo apt-get purge linux-image-3.19.0-25-generic''\\
''$ sudo apt-get purge linux-image-3.19.0-56-generic''\\

When you're done removing the older kernels, you can run this to remove ever packages you won't need anymore:\\

''$ sudo apt-get autoremove''\\

And finally you can run this to update grub kernel list:\\

''$ sudo update-grub''\\


--- depreciated ---\\
From AskUbuntu,\\

In Terminal, type
<code>
sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d')
</code>


or using Synaptic\\
First find your latest kernel by typing
<code>uname -r</code>
Search for **linux-image**, right-click a kernel (not your current one) and choose ''Mark for Complete Removal'' and finally click the ''Apply'' button to delete the kernel.\\
Similarly do the same for **linux-headers.**\\

DO NOT remove your current kernel, you will make your system UNBOOTABLE!