This command will remove all but your running kernel from the command line:
sudo apt-get remove --purge $(dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d') Source is here: http://askubuntu.com/questions/2793/how-do-i-remove-or-hide-old-kernel-versions-to-clean-up-the-boot-menu and it's what I use to make space when /boot is getting on for full. On 15 August 2014 11:07, Barry Drake <ubuntu-advertis...@gmx.com> wrote: > On 15/08/14 11:02, Alan Pope wrote: > >> On 15 August 2014 10:59, Barry Drake <ubuntu-advertis...@gmx.com> wrote: >> >>> If I want to do it using apt-get, I'm going to have to use the command >>> for every one which will take a while. Is there a tool >>> for automating this just a bit? >>> >> Does this command offer to remove some? >> sudo apt-get autoremove >> > No. All it offers to do is to remove one package no longer required. > Nothing to do with the kernel is shown. Ah well ... When I've got time on > my hands I'll go through them. Thanks anyway. > > Regards, Barry. > > > -- > ubuntu-uk@lists.ubuntu.com > https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk > https://wiki.ubuntu.com/UKTeam/ > -- Twitter: @sfgreenwood "TBA are particularly glib"
-- ubuntu-uk@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk https://wiki.ubuntu.com/UKTeam/