Como posso remover o antigo linux-image-5.13.0-23-generic

Como posso remover o antigo linux-image-5.13.0-23-generic

Depois de atualizar 20.04 para 22.04, não consigo instalar o novo software porque o antigo linux-image-5.13.0-23-generic (5.13.0-23.23) não pode ser removido. Durante a atualização eu disse ao sistema para manter as coisas antigas, o que provavelmente foi a causa do problema. Quando tento instalar um novo software, recebo a seguinte saída:

Removing linux-image-5.13.0-23-generic (5.13.0-23.23) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.13.0-23-generic
/etc/kernel/postrm.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
/etc/grub.d/bin/grubcfg_proxy: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-5.13.0-23-generic (--remove):
 subprocess package linux-image-5.13.0-23-generic install script post-removal d returned error value 1
dpkg: too many errors; stopped
Errors found while processing: linux-image-5.13.0-23-generic
Processing was aborted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Eu tentei sudo apt-get --purge remove linux-image-5.13.0-23-generic e sudo apt-get install -f mas obtive a mesma saída acima.

Obrigado. Infelizmente tive que reinstalar o Ubuntu 22.04 porque peguei um cavalo de Tróia e não consegui instalar o ClamAV por causa deste problema de kernel. Não me atrevi a usar o Ubuntu para tentar sua sugestão. Vou deixar esta questão por alguns dias antes de removê-la.

informação relacionada