diff --git flag.inc flag.inc
index 3099179..b91ea2c 100644
--- flag.inc
+++ flag.inc
@@ -1010,6 +1010,47 @@ class flag_flag {
   }
 
   /**
+   * Finds the "default flag" corresponding to this flag.
+   *
+   * Flags defined in code ("default flags") can be overridden. This method
+   * returns the default flag that is being overridden by $this. Returns NULL
+   * if $this overrides no default flag.
+   */
+  function find_default_flag() {
+    if ($this->fid) {
+      $default_flags = flag_get_default_flags(TRUE);
+      if (isset($default_flags[$this->name])) {
+        return $default_flags[$this->name];
+      }
+    }
+  }
+
+  /**
+   * Reverts an overriding flag to its default state.
+   *
+   * Note that $this isn't altered. To see the reverted flag you'll have to
+   * call flag_get_flag($this->name) again.
+   *
+   * @return
+   *   TRUE if the flag was reverted successfully; FALSE if there was an error;
+   *   NULL if this flag overrides no default flag.
+   */
+  function revert() {
+    if (($default_flag = $this->find_default_flag())) {
+      if ($default_flag->is_compatible()) {
+        $default_flag = clone $default_flag;
+        $default_flag->fid = $this->fid;
+        $default_flag->save();
+        flag_get_flags(NULL, NULL, NULL, TRUE);
+        return TRUE;
+      }
+      else {
+        return FALSE;
+      }
+    }
+  }
+
+  /**
    * Disable a flag provided by a module.
    */
   function disable() {
diff --git includes/flag.features.inc includes/flag.features.inc
index a08ce8b..03ed2bb 100644
--- includes/flag.features.inc
+++ includes/flag.features.inc
@@ -62,10 +62,12 @@ function flag_features_revert($module = NULL) {
     module_load_include('inc', 'flag', '/includes/flag.admin');
     $default_flags = module_invoke($module, 'flag_default_flags');
 
-    // Delete flags that are defined in code.
+    // Revert flags that are defined in code.
     foreach ($default_flags as $default_flag) {
       $current_flag = flag_get_flag($default_flag['name']);
-      $current_flag->delete();
+      if ($current_flag->revert() === FALSE) {
+        drupal_set_message(t('Could not revert flag %flag-name to the state described in your code: Your flag was created by a different version of the Flag module than is now being used.', array('%flag-name' => $current_flag->name)), 'error');
+      }
     }
     _flag_clear_cache();
   }
