diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc
index 052fb5e..8ea966c 100644
--- a/modules/system/system.admin.inc
+++ b/modules/system/system.admin.inc
@@ -1347,6 +1347,9 @@ function system_modules_uninstall_submit($form, &$form_state) {
     drupal_set_message(t('The selected modules have been uninstalled.'));
 
     $form_state['redirect'] = 'admin/modules/uninstall';
+
+    // Synchronize actions to remove all related to uninstalled modules.
+    actions_synchronize();
   }
   else {
     $form_state['storage'] = $form_state['values'];
diff --git a/modules/trigger/trigger.install b/modules/trigger/trigger.install
index 5ed4077..4147341 100644
--- a/modules/trigger/trigger.install
+++ b/modules/trigger/trigger.install
@@ -47,11 +47,17 @@ function trigger_schema() {
 }
 
 /**
- * Implements hook_install().
+ * Implements hook_enable().
+ *
+ * Removes all assigned orphaned actions while the module has been disabled.
  */
-function trigger_install() {
-  // Do initial synchronization of actions in code and the database.
-  actions_synchronize();
+function trigger_enable() {
+  // Synchronize {trigger_assignments} table with a current set of actions.
+  $select = db_select('actions')
+    ->fields('actions', array('aid'));
+  db_delete('trigger_assignments')
+    ->condition('aid', $select, 'NOT IN')
+    ->execute();
 }
 
 /**
diff --git a/modules/trigger/trigger.test b/modules/trigger/trigger.test
index 4a3016a..53e3cd2 100644
--- a/modules/trigger/trigger.test
+++ b/modules/trigger/trigger.test
@@ -729,6 +729,7 @@ class TriggerOrphanedActionsTestCase extends DrupalWebTestCase {
     // Disable the module that provides the action and make sure the trigger
     // doesn't white screen.
     module_disable(array('trigger_test'));
+    variable_set('trigger_test_generic_any_action', 0);
     $loaded_node = $this->drupalGetNodeByTitle($edit["title"]);
     $edit["body[$langcode][0][value]"] = '!SimpleTest test body! ' . $this->randomName(32) . ' ' . $this->randomName(32);
     $this->drupalPost("node/$loaded_node->nid/edit", $edit, t('Save'));
@@ -736,5 +737,7 @@ class TriggerOrphanedActionsTestCase extends DrupalWebTestCase {
     // If the node body was updated successfully we have dealt with the
     // unavailable action.
     $this->assertRaw(t('!post %title has been updated.', array('!post' => 'Basic page', '%title' => $edit["title"])), t('Make sure the Basic page can be updated with the missing trigger function.'));
+    // Action should not have been fired.
+    $this->assertFalse(variable_get('trigger_test_generic_any_action', 0), t('Trigger test action has not been fired.'));
   }
 }
