I reckon this error happens when corresponding linux-image package has been removed before linux-ubuntu-modules is purged. linux-ubuntu-modules .postrm shouldn't be doing depmod or update-initramfs anymore in this case. You can probably workaround this issue by manually creating /lib/modules/2.6.22-12-generic directory and then trying to purge linux-ubuntu-modules.
I reckon this error happens when corresponding linux-image package has been removed before linux-ubuntu- modules is purged. linux-ubuntu- modules .postrm shouldn't be doing depmod or update-initramfs anymore in this case. You can probably workaround this issue by manually creating /lib/modules/ 2.6.22- 12-generic directory and then trying to purge linux-ubuntu- modules.