Simply I want to clean older kernel's modules. It's "uname -r" but I need to get such information for all kernels with Python (I already know their names and can clean kernel files, initramfs and System.map). if that is possible ...

Thank you.