I want to remove old linux kernels

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












But they're persistent. I've tried synaptic, dpkg --purge, and apt remove, bikeshed's purge-old-kernels, and several scripts for removal in other question-answers. All these commands think the old kernels and headers are gone.



Still have 4.4-30,43,45, and 4.8-30,43,45.



Am I just dumb? I can't figure out how to banish these old kernels



ls -l /boot

total 235049

-rw-r--r-- 1 root root 1443149 Apr 6 12:28 abi-4.10.0-19-generic
-rw-r--r-- 1 root root 1242701 Oct 12 2016 abi-4.4.0-43-generic
-rw-r--r-- 1 root root 1242701 Oct 19 12:34 abi-4.4.0-45-generic
-rw-r--r-- 1 root root 1407739 Dec 1 11:02 abi-4.8.0-30-generic
-rw-r--r-- 1 root root 204918 Apr 6 12:28 config-4.10.0-19-generic
-rw-r--r-- 1 root root 189760 Oct 12 2016 config-4.4.0-43-generic
-rw-r--r-- 1 root root 189760 Oct 19 12:34 config-4.4.0-45-generic
-rw-r--r-- 1 root root 199485 Dec 1 11:02 config-4.8.0-30-generic
drwx------ 3 root root 1024 Dec 31 1969 efi
drwxr-xr-x 5 root root 4096 Apr 19 00:43 grub
-rw-r--r-- 1 root root 43128920 Apr 11 00:19 initrd.img-4.10.0-19-generic
-rw-r--r-- 1 root root 37850493 Oct 18 2016 initrd.img-4.4.0-43-generic
-rw-r--r-- 1 root root 37852358 Oct 20 12:50 initrd.img-4.4.0-45-generic
-rw-r--r-- 1 root root 41316093 Dec 24 22:49 initrd.img-4.8.0-30-generic
-rw-r--r-- 1 root root 182704 Jan 28 2016 memtest86+.bin
-rw-r--r-- 1 root root 184380 Jan 28 2016 memtest86+.elf
-rw-r--r-- 1 root root 184840 Jan 28 2016 memtest86+_multiboot.bin
-rw------- 1 root root 3718456 Apr 6 12:28 System.map-4.10.0-19-generic
-rw------- 1 root root 3869895 Oct 12 2016 System.map-4.4.0-43-generic
-rw------- 1 root root 3869895 Oct 19 12:34 System.map-4.4.0-45-generic
-rw------- 1 root root 4060223 Dec 1 11:02 System.map-4.8.0-30-generic
-rw------- 1 root root 7567120 Apr 6 12:28 vmlinuz-4.10.0-19-generic
-rw------- 1 root root 7569048 Apr 10 19:36 vmlinuz-4.10.0-19-generic.efi.signed
-rw------- 1 root root 7053568 Oct 12 2016 vmlinuz-4.4.0-43-generic
-rw------- 1 root root 7055480 Oct 17 2016 vmlinuz-4.4.0-43-generic.efi.signed
-rw------- 1 root root 7054208 Oct 19 12:34 vmlinuz-4.4.0-45-generic
-rw------- 1 root root 7056120 Oct 20 12:50 vmlinuz-4.4.0-45-generic.efi.signed
-rw------- 1 root root 7464736 Dec 1 11:02 vmlinuz-4.8.0-30-generic
-rw------- 1 root root 7466648 Dec 6 01:23 vmlinuz-4.8.0-30-generic.efi.signed






share|improve this question



















  • What does dpkg -S /boot/abi-4.4.0-45-generic return?
    – muru
    Apr 19 '17 at 7:12






  • 1




    “I've tried…” What was the output? I think the output from dpkg would suffice for further diagnostics.
    – Melebius
    Apr 19 '17 at 7:17











  • dpkg-query: no path found matching pattern /boot/abi-4.4.0-45-generic
    – Tom Mercer
    Apr 19 '17 at 7:17










  • Have you tried sudo apt-get autoremove? In my machine it cleaned the old ones and left only the latest two.
    – Katu
    Apr 19 '17 at 7:23










  • I have also tried autoremove. It says 0 to remove 0 upgraded 0 new 0 not upgraded.
    – Tom Mercer
    Apr 19 '17 at 7:26














up vote
1
down vote

favorite












But they're persistent. I've tried synaptic, dpkg --purge, and apt remove, bikeshed's purge-old-kernels, and several scripts for removal in other question-answers. All these commands think the old kernels and headers are gone.



Still have 4.4-30,43,45, and 4.8-30,43,45.



Am I just dumb? I can't figure out how to banish these old kernels



ls -l /boot

total 235049

-rw-r--r-- 1 root root 1443149 Apr 6 12:28 abi-4.10.0-19-generic
-rw-r--r-- 1 root root 1242701 Oct 12 2016 abi-4.4.0-43-generic
-rw-r--r-- 1 root root 1242701 Oct 19 12:34 abi-4.4.0-45-generic
-rw-r--r-- 1 root root 1407739 Dec 1 11:02 abi-4.8.0-30-generic
-rw-r--r-- 1 root root 204918 Apr 6 12:28 config-4.10.0-19-generic
-rw-r--r-- 1 root root 189760 Oct 12 2016 config-4.4.0-43-generic
-rw-r--r-- 1 root root 189760 Oct 19 12:34 config-4.4.0-45-generic
-rw-r--r-- 1 root root 199485 Dec 1 11:02 config-4.8.0-30-generic
drwx------ 3 root root 1024 Dec 31 1969 efi
drwxr-xr-x 5 root root 4096 Apr 19 00:43 grub
-rw-r--r-- 1 root root 43128920 Apr 11 00:19 initrd.img-4.10.0-19-generic
-rw-r--r-- 1 root root 37850493 Oct 18 2016 initrd.img-4.4.0-43-generic
-rw-r--r-- 1 root root 37852358 Oct 20 12:50 initrd.img-4.4.0-45-generic
-rw-r--r-- 1 root root 41316093 Dec 24 22:49 initrd.img-4.8.0-30-generic
-rw-r--r-- 1 root root 182704 Jan 28 2016 memtest86+.bin
-rw-r--r-- 1 root root 184380 Jan 28 2016 memtest86+.elf
-rw-r--r-- 1 root root 184840 Jan 28 2016 memtest86+_multiboot.bin
-rw------- 1 root root 3718456 Apr 6 12:28 System.map-4.10.0-19-generic
-rw------- 1 root root 3869895 Oct 12 2016 System.map-4.4.0-43-generic
-rw------- 1 root root 3869895 Oct 19 12:34 System.map-4.4.0-45-generic
-rw------- 1 root root 4060223 Dec 1 11:02 System.map-4.8.0-30-generic
-rw------- 1 root root 7567120 Apr 6 12:28 vmlinuz-4.10.0-19-generic
-rw------- 1 root root 7569048 Apr 10 19:36 vmlinuz-4.10.0-19-generic.efi.signed
-rw------- 1 root root 7053568 Oct 12 2016 vmlinuz-4.4.0-43-generic
-rw------- 1 root root 7055480 Oct 17 2016 vmlinuz-4.4.0-43-generic.efi.signed
-rw------- 1 root root 7054208 Oct 19 12:34 vmlinuz-4.4.0-45-generic
-rw------- 1 root root 7056120 Oct 20 12:50 vmlinuz-4.4.0-45-generic.efi.signed
-rw------- 1 root root 7464736 Dec 1 11:02 vmlinuz-4.8.0-30-generic
-rw------- 1 root root 7466648 Dec 6 01:23 vmlinuz-4.8.0-30-generic.efi.signed






share|improve this question



















  • What does dpkg -S /boot/abi-4.4.0-45-generic return?
    – muru
    Apr 19 '17 at 7:12






  • 1




    “I've tried…” What was the output? I think the output from dpkg would suffice for further diagnostics.
    – Melebius
    Apr 19 '17 at 7:17











  • dpkg-query: no path found matching pattern /boot/abi-4.4.0-45-generic
    – Tom Mercer
    Apr 19 '17 at 7:17










  • Have you tried sudo apt-get autoremove? In my machine it cleaned the old ones and left only the latest two.
    – Katu
    Apr 19 '17 at 7:23










  • I have also tried autoremove. It says 0 to remove 0 upgraded 0 new 0 not upgraded.
    – Tom Mercer
    Apr 19 '17 at 7:26












up vote
1
down vote

favorite









up vote
1
down vote

favorite











But they're persistent. I've tried synaptic, dpkg --purge, and apt remove, bikeshed's purge-old-kernels, and several scripts for removal in other question-answers. All these commands think the old kernels and headers are gone.



Still have 4.4-30,43,45, and 4.8-30,43,45.



Am I just dumb? I can't figure out how to banish these old kernels



ls -l /boot

total 235049

-rw-r--r-- 1 root root 1443149 Apr 6 12:28 abi-4.10.0-19-generic
-rw-r--r-- 1 root root 1242701 Oct 12 2016 abi-4.4.0-43-generic
-rw-r--r-- 1 root root 1242701 Oct 19 12:34 abi-4.4.0-45-generic
-rw-r--r-- 1 root root 1407739 Dec 1 11:02 abi-4.8.0-30-generic
-rw-r--r-- 1 root root 204918 Apr 6 12:28 config-4.10.0-19-generic
-rw-r--r-- 1 root root 189760 Oct 12 2016 config-4.4.0-43-generic
-rw-r--r-- 1 root root 189760 Oct 19 12:34 config-4.4.0-45-generic
-rw-r--r-- 1 root root 199485 Dec 1 11:02 config-4.8.0-30-generic
drwx------ 3 root root 1024 Dec 31 1969 efi
drwxr-xr-x 5 root root 4096 Apr 19 00:43 grub
-rw-r--r-- 1 root root 43128920 Apr 11 00:19 initrd.img-4.10.0-19-generic
-rw-r--r-- 1 root root 37850493 Oct 18 2016 initrd.img-4.4.0-43-generic
-rw-r--r-- 1 root root 37852358 Oct 20 12:50 initrd.img-4.4.0-45-generic
-rw-r--r-- 1 root root 41316093 Dec 24 22:49 initrd.img-4.8.0-30-generic
-rw-r--r-- 1 root root 182704 Jan 28 2016 memtest86+.bin
-rw-r--r-- 1 root root 184380 Jan 28 2016 memtest86+.elf
-rw-r--r-- 1 root root 184840 Jan 28 2016 memtest86+_multiboot.bin
-rw------- 1 root root 3718456 Apr 6 12:28 System.map-4.10.0-19-generic
-rw------- 1 root root 3869895 Oct 12 2016 System.map-4.4.0-43-generic
-rw------- 1 root root 3869895 Oct 19 12:34 System.map-4.4.0-45-generic
-rw------- 1 root root 4060223 Dec 1 11:02 System.map-4.8.0-30-generic
-rw------- 1 root root 7567120 Apr 6 12:28 vmlinuz-4.10.0-19-generic
-rw------- 1 root root 7569048 Apr 10 19:36 vmlinuz-4.10.0-19-generic.efi.signed
-rw------- 1 root root 7053568 Oct 12 2016 vmlinuz-4.4.0-43-generic
-rw------- 1 root root 7055480 Oct 17 2016 vmlinuz-4.4.0-43-generic.efi.signed
-rw------- 1 root root 7054208 Oct 19 12:34 vmlinuz-4.4.0-45-generic
-rw------- 1 root root 7056120 Oct 20 12:50 vmlinuz-4.4.0-45-generic.efi.signed
-rw------- 1 root root 7464736 Dec 1 11:02 vmlinuz-4.8.0-30-generic
-rw------- 1 root root 7466648 Dec 6 01:23 vmlinuz-4.8.0-30-generic.efi.signed






share|improve this question











But they're persistent. I've tried synaptic, dpkg --purge, and apt remove, bikeshed's purge-old-kernels, and several scripts for removal in other question-answers. All these commands think the old kernels and headers are gone.



Still have 4.4-30,43,45, and 4.8-30,43,45.



Am I just dumb? I can't figure out how to banish these old kernels



ls -l /boot

total 235049

-rw-r--r-- 1 root root 1443149 Apr 6 12:28 abi-4.10.0-19-generic
-rw-r--r-- 1 root root 1242701 Oct 12 2016 abi-4.4.0-43-generic
-rw-r--r-- 1 root root 1242701 Oct 19 12:34 abi-4.4.0-45-generic
-rw-r--r-- 1 root root 1407739 Dec 1 11:02 abi-4.8.0-30-generic
-rw-r--r-- 1 root root 204918 Apr 6 12:28 config-4.10.0-19-generic
-rw-r--r-- 1 root root 189760 Oct 12 2016 config-4.4.0-43-generic
-rw-r--r-- 1 root root 189760 Oct 19 12:34 config-4.4.0-45-generic
-rw-r--r-- 1 root root 199485 Dec 1 11:02 config-4.8.0-30-generic
drwx------ 3 root root 1024 Dec 31 1969 efi
drwxr-xr-x 5 root root 4096 Apr 19 00:43 grub
-rw-r--r-- 1 root root 43128920 Apr 11 00:19 initrd.img-4.10.0-19-generic
-rw-r--r-- 1 root root 37850493 Oct 18 2016 initrd.img-4.4.0-43-generic
-rw-r--r-- 1 root root 37852358 Oct 20 12:50 initrd.img-4.4.0-45-generic
-rw-r--r-- 1 root root 41316093 Dec 24 22:49 initrd.img-4.8.0-30-generic
-rw-r--r-- 1 root root 182704 Jan 28 2016 memtest86+.bin
-rw-r--r-- 1 root root 184380 Jan 28 2016 memtest86+.elf
-rw-r--r-- 1 root root 184840 Jan 28 2016 memtest86+_multiboot.bin
-rw------- 1 root root 3718456 Apr 6 12:28 System.map-4.10.0-19-generic
-rw------- 1 root root 3869895 Oct 12 2016 System.map-4.4.0-43-generic
-rw------- 1 root root 3869895 Oct 19 12:34 System.map-4.4.0-45-generic
-rw------- 1 root root 4060223 Dec 1 11:02 System.map-4.8.0-30-generic
-rw------- 1 root root 7567120 Apr 6 12:28 vmlinuz-4.10.0-19-generic
-rw------- 1 root root 7569048 Apr 10 19:36 vmlinuz-4.10.0-19-generic.efi.signed
-rw------- 1 root root 7053568 Oct 12 2016 vmlinuz-4.4.0-43-generic
-rw------- 1 root root 7055480 Oct 17 2016 vmlinuz-4.4.0-43-generic.efi.signed
-rw------- 1 root root 7054208 Oct 19 12:34 vmlinuz-4.4.0-45-generic
-rw------- 1 root root 7056120 Oct 20 12:50 vmlinuz-4.4.0-45-generic.efi.signed
-rw------- 1 root root 7464736 Dec 1 11:02 vmlinuz-4.8.0-30-generic
-rw------- 1 root root 7466648 Dec 6 01:23 vmlinuz-4.8.0-30-generic.efi.signed








share|improve this question










share|improve this question




share|improve this question









asked Apr 19 '17 at 7:04









Tom Mercer

5611323




5611323











  • What does dpkg -S /boot/abi-4.4.0-45-generic return?
    – muru
    Apr 19 '17 at 7:12






  • 1




    “I've tried…” What was the output? I think the output from dpkg would suffice for further diagnostics.
    – Melebius
    Apr 19 '17 at 7:17











  • dpkg-query: no path found matching pattern /boot/abi-4.4.0-45-generic
    – Tom Mercer
    Apr 19 '17 at 7:17










  • Have you tried sudo apt-get autoremove? In my machine it cleaned the old ones and left only the latest two.
    – Katu
    Apr 19 '17 at 7:23










  • I have also tried autoremove. It says 0 to remove 0 upgraded 0 new 0 not upgraded.
    – Tom Mercer
    Apr 19 '17 at 7:26
















  • What does dpkg -S /boot/abi-4.4.0-45-generic return?
    – muru
    Apr 19 '17 at 7:12






  • 1




    “I've tried…” What was the output? I think the output from dpkg would suffice for further diagnostics.
    – Melebius
    Apr 19 '17 at 7:17











  • dpkg-query: no path found matching pattern /boot/abi-4.4.0-45-generic
    – Tom Mercer
    Apr 19 '17 at 7:17










  • Have you tried sudo apt-get autoremove? In my machine it cleaned the old ones and left only the latest two.
    – Katu
    Apr 19 '17 at 7:23










  • I have also tried autoremove. It says 0 to remove 0 upgraded 0 new 0 not upgraded.
    – Tom Mercer
    Apr 19 '17 at 7:26















What does dpkg -S /boot/abi-4.4.0-45-generic return?
– muru
Apr 19 '17 at 7:12




What does dpkg -S /boot/abi-4.4.0-45-generic return?
– muru
Apr 19 '17 at 7:12




1




1




“I've tried…” What was the output? I think the output from dpkg would suffice for further diagnostics.
– Melebius
Apr 19 '17 at 7:17





“I've tried…” What was the output? I think the output from dpkg would suffice for further diagnostics.
– Melebius
Apr 19 '17 at 7:17













dpkg-query: no path found matching pattern /boot/abi-4.4.0-45-generic
– Tom Mercer
Apr 19 '17 at 7:17




dpkg-query: no path found matching pattern /boot/abi-4.4.0-45-generic
– Tom Mercer
Apr 19 '17 at 7:17












Have you tried sudo apt-get autoremove? In my machine it cleaned the old ones and left only the latest two.
– Katu
Apr 19 '17 at 7:23




Have you tried sudo apt-get autoremove? In my machine it cleaned the old ones and left only the latest two.
– Katu
Apr 19 '17 at 7:23












I have also tried autoremove. It says 0 to remove 0 upgraded 0 new 0 not upgraded.
– Tom Mercer
Apr 19 '17 at 7:26




I have also tried autoremove. It says 0 to remove 0 upgraded 0 new 0 not upgraded.
– Tom Mercer
Apr 19 '17 at 7:26










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










I am assuming that you want to keep 4.10 and remove everything else.



Make sure that you are running 4.10 and simply do



cd /boot
sudo rm abi-4.4* abi-4.8* config-4.4* config-4.8* initrd.img-4.4* initrd.img-4.8* System.map-4.4* System.map-4.8* vmlinuz-4.4* vmlinuz-4.8*
cd /lib/modules/
sudo rm -r 4.4.0-43-generic/ 4.4.0-45-generic/ 4.8.0-30-generic/
sudo update-grub





share|improve this answer























  • Interestingly, there were no directories in /lib/modules for the old ones.
    – Tom Mercer
    Apr 19 '17 at 7:30










  • those might have been removed by package manager on some script that you used
    – Manoj Sawai
    Apr 19 '17 at 7:32










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f906511%2fi-want-to-remove-old-linux-kernels%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
2
down vote



accepted










I am assuming that you want to keep 4.10 and remove everything else.



Make sure that you are running 4.10 and simply do



cd /boot
sudo rm abi-4.4* abi-4.8* config-4.4* config-4.8* initrd.img-4.4* initrd.img-4.8* System.map-4.4* System.map-4.8* vmlinuz-4.4* vmlinuz-4.8*
cd /lib/modules/
sudo rm -r 4.4.0-43-generic/ 4.4.0-45-generic/ 4.8.0-30-generic/
sudo update-grub





share|improve this answer























  • Interestingly, there were no directories in /lib/modules for the old ones.
    – Tom Mercer
    Apr 19 '17 at 7:30










  • those might have been removed by package manager on some script that you used
    – Manoj Sawai
    Apr 19 '17 at 7:32














up vote
2
down vote



accepted










I am assuming that you want to keep 4.10 and remove everything else.



Make sure that you are running 4.10 and simply do



cd /boot
sudo rm abi-4.4* abi-4.8* config-4.4* config-4.8* initrd.img-4.4* initrd.img-4.8* System.map-4.4* System.map-4.8* vmlinuz-4.4* vmlinuz-4.8*
cd /lib/modules/
sudo rm -r 4.4.0-43-generic/ 4.4.0-45-generic/ 4.8.0-30-generic/
sudo update-grub





share|improve this answer























  • Interestingly, there were no directories in /lib/modules for the old ones.
    – Tom Mercer
    Apr 19 '17 at 7:30










  • those might have been removed by package manager on some script that you used
    – Manoj Sawai
    Apr 19 '17 at 7:32












up vote
2
down vote



accepted







up vote
2
down vote



accepted






I am assuming that you want to keep 4.10 and remove everything else.



Make sure that you are running 4.10 and simply do



cd /boot
sudo rm abi-4.4* abi-4.8* config-4.4* config-4.8* initrd.img-4.4* initrd.img-4.8* System.map-4.4* System.map-4.8* vmlinuz-4.4* vmlinuz-4.8*
cd /lib/modules/
sudo rm -r 4.4.0-43-generic/ 4.4.0-45-generic/ 4.8.0-30-generic/
sudo update-grub





share|improve this answer















I am assuming that you want to keep 4.10 and remove everything else.



Make sure that you are running 4.10 and simply do



cd /boot
sudo rm abi-4.4* abi-4.8* config-4.4* config-4.8* initrd.img-4.4* initrd.img-4.8* System.map-4.4* System.map-4.8* vmlinuz-4.4* vmlinuz-4.8*
cd /lib/modules/
sudo rm -r 4.4.0-43-generic/ 4.4.0-45-generic/ 4.8.0-30-generic/
sudo update-grub






share|improve this answer















share|improve this answer



share|improve this answer








edited Apr 19 '17 at 7:34









muru

128k19269459




128k19269459











answered Apr 19 '17 at 7:26









Manoj Sawai

6211619




6211619











  • Interestingly, there were no directories in /lib/modules for the old ones.
    – Tom Mercer
    Apr 19 '17 at 7:30










  • those might have been removed by package manager on some script that you used
    – Manoj Sawai
    Apr 19 '17 at 7:32
















  • Interestingly, there were no directories in /lib/modules for the old ones.
    – Tom Mercer
    Apr 19 '17 at 7:30










  • those might have been removed by package manager on some script that you used
    – Manoj Sawai
    Apr 19 '17 at 7:32















Interestingly, there were no directories in /lib/modules for the old ones.
– Tom Mercer
Apr 19 '17 at 7:30




Interestingly, there were no directories in /lib/modules for the old ones.
– Tom Mercer
Apr 19 '17 at 7:30












those might have been removed by package manager on some script that you used
– Manoj Sawai
Apr 19 '17 at 7:32




those might have been removed by package manager on some script that you used
– Manoj Sawai
Apr 19 '17 at 7:32












 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f906511%2fi-want-to-remove-old-linux-kernels%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

Trouble downloading packages list due to a “Hash sum mismatch” error

How do I move numbers in filenames, in a batch renaming operation?