If its Ubuntu/Debian you just ‘apt autoremove’. This it will remove old unused kernels and will remove any unneeded packages from previously uninstalled programs as well.
Btw the apt-get autoremove will only work after the install of a new kernel so you still need to make space to get it installed in the first place yeah?
A more crude way, if you have sftp access as root is to login using a client like winscp etc go to the dir and delete the unwanted kernels directly to make space so you can run your update command successfully.
Care needed though. It’s what I did a number of years ago when I had the same problem, the console commands above are actually from a Leaseweb server engineer
sorry for the late reply, I didn’t get the responses from above, so I will have a look at this today (as I need to get it fixed)
I belive I did remove old kernels,
** the issue seems to me to be the discrepancy between what free space there is :
– Virtualmin Edit Mount shows : Disk usage Size 189.68 MB Free 8.81 MB"
– df -h /dev/sda1 190M 64M 112M 37% /boot
Many years ago I had a similar problem and found a way to remove all old kernels from my Ubuntu system in one go.
Only the current one remains.
sudo apt-get remove -y --purge $(dpkg -l ‘linux-’) | sed ‘/^ii/!d;/’"$(uname -r | sed "s/(.)-([^0-9]+)/\1/")"’/d;s/^[^ ]* [^ ]* ([^ ])./\1/;/[0-9]/!d’)
After every kernel update I used this and since then I have a clean boot directory.
And by clean boot directory I mean that only the current kernel is represented.
I hope it helps you with your problem and you can implement it in your distro accordingly.