If you have left the country for good then you can cancel your KRA pin by login to you itax portal account, then go to registration and select e-cancellation. Enter cancellation reasons and attach supporting documents.
If you intend to return to Kenya, you can be filing nil returns instead of cancelling.