Unable to delete unused kernel with rm rf please tell me what I am doing wrong.
by Anibae from LinuxQuestions.org on (#6G56H)
Can someone please help?
I want to delete a the old kernels in my system.
The issue is that my /boot is completely full so apt commands does not work.
sudo apt --purge autoremove usually does the trick but in this case I receive unmatched dependencies.
Now I thought an easy method to solve this would be to
sudo rm -rf /boot/-5.15.0-84 but nothing happens when I use that command.
When I just use rm and not rf it says no such directory.
Now When I go to /cd boot and I run ls -la I do not see -5.15.0-84
But when I run sudo dpkg --list | grep linux-image
I see rc linux-image-5.15.0-84-generic 5.15.0-84.93
How can I remove that kernel without using a apt command? Since they are not working?
The reason I am trying this solution is becasue of this thread
https://www.linuxquestions.org/quest...ng-4175708641/
OK, so in the end I:
+) checked wich kernel I was booted into (uname -r)
+) freed some space in the /boot partition by "sudo rm <old kernel>
+) sudo apt --fix-broken install
+) sudo apt-get autoremove
I had to repeat the fix broken install and autoremove passages a couple of times, but in the end everything worked out just fine
Thank you very much, once I understood that I could safely "rm" to free some space, it was easy as a piece of cake.
But I am having no luck to use the rm command
I want to delete a the old kernels in my system.
The issue is that my /boot is completely full so apt commands does not work.
sudo apt --purge autoremove usually does the trick but in this case I receive unmatched dependencies.
Now I thought an easy method to solve this would be to
sudo rm -rf /boot/-5.15.0-84 but nothing happens when I use that command.
When I just use rm and not rf it says no such directory.
Now When I go to /cd boot and I run ls -la I do not see -5.15.0-84
But when I run sudo dpkg --list | grep linux-image
I see rc linux-image-5.15.0-84-generic 5.15.0-84.93
How can I remove that kernel without using a apt command? Since they are not working?
The reason I am trying this solution is becasue of this thread
https://www.linuxquestions.org/quest...ng-4175708641/
OK, so in the end I:
+) checked wich kernel I was booted into (uname -r)
+) freed some space in the /boot partition by "sudo rm <old kernel>
+) sudo apt --fix-broken install
+) sudo apt-get autoremove
I had to repeat the fix broken install and autoremove passages a couple of times, but in the end everything worked out just fine
Thank you very much, once I understood that I could safely "rm" to free some space, it was easy as a piece of cake.
But I am having no luck to use the rm command