diff --git a/nodeapi_example/nodeapi_example.install b/nodeapi_example/nodeapi_example.install
index 7abfc01..c7ad61b 100644
--- a/nodeapi_example/nodeapi_example.install
+++ b/nodeapi_example/nodeapi_example.install
@@ -7,6 +7,8 @@
 
 /**
  * Implements hook_schema().
+ *
+ * @ingroup nodeapi_example
  */
 function nodeapi_example_schema() {
   $schema['nodeapi_example'] = array(
@@ -42,3 +44,40 @@ function nodeapi_example_schema() {
 
   return $schema;
 }
+
+/**
+ * Implements hook_uninstall().
+ *
+ * We need to clean up our variable_* data when uninstalling
+ * our module.
+ *
+ * Our implementation of nodeapi_example_form_alter() automatically
+ * created a nodeapi_example_contentType variable
+ * for each node type the user wants to rate.
+ *
+ * To delete our variables we call variable_del for our variables'
+ * namespace, 'nodeapi_example_'.
+ * We do this because the administrator could have deleted node
+ * types for which we have variables, and we have no way of knowing
+ * what they are. Because we used variable naming best-practices,
+ * we can be reasonably sure that any variable that starts with
+ * our module name belongs to us.
+ *
+ * hook_uninstall() will only be called when uninstalling a module,
+ * not when disabling a module. This allows our data to say in the
+ * database if the user only disables our module without uninstalling
+ * it.
+ *
+ * @ingroup nodeapi_example
+ */
+function nodeapi_example_uninstall() {
+  // Simple DB query to get the names of our variables.
+  $results = db_select('variable', 'v')
+    ->fields('v', array('name'))
+    ->condition('name', 'nodeapi_example_%', 'LIKE')
+    ->execute();
+  // Loop through and tell Drupal to delete each of our variables.
+  foreach ($results as $result) {
+    variable_del($result->name);
+  }
+}
