hook_disable()
Perform necessary actions before module is disabled.
The hook is called everytime module is disabled.
modules/system/system.api.php, line 2343
<?php function hook_disable() { mymodule_cache_rebuild(); } ?>
Some quick links to get you started