diff --git a/feeds.module b/feeds.module
index 420c6b5..d395156 100644
--- a/feeds.module
+++ b/feeds.module
@@ -758,6 +758,90 @@ function feeds_export($importer_id, $indent = '') {
 }
 
 /**
+ * Unpublish/Remove nodes no longer in feed.
+ */
+function feeds_feeds_after_import(FeedsSource $source) {
+  //dpm($source);
+  //drupal_set_message(print_r($source, true));
+
+  // Function does not exist then we are not in a node processor so drop out.
+  if (method_exists($source->importer->processor,"getFeedNids") == false) {
+    return;
+  }
+  // Make sure we have the processed nids.
+  if (!is_array($source->importer->processor->processed_nids)) {
+    return;
+  }
+  // Property determining the type of update does not exist drop out.
+  if (isset($source->importer->processor->config['update_non_existant']) == false) {
+    return;
+  }
+  // If none of the avaliable actions are defined drop out.
+  if (defined('FEEDS_SKIP_NON_EXISTANT') == false && defined('FEEDS_UNPUBLISH_NON_EXISTANT') == false && defined('FEEDS_REMOVE_NON_EXISTANT') == false) {
+    return;
+  }
+  // Get a list of the feeds node ids.
+  $feedNodes = $source->importer->processor->getFeedNids($source);
+  // Now we have a list of all nodes origniated from this feed we need to
+  // remove the ones from the list to be unpublished/removed that have been
+  // imported this time round.
+  foreach ($source->importer->processor->processed_nids as $nid) {
+    if (isset($feedNodes[$nid])) {
+      unset($feedNodes[$nid]);
+    }
+  }
+  // If we have nothing to unpublish/remove then drop out.
+  if (count($feedNodes) == 0) {
+    return;
+  }
+  // Work out what we are going todo with the nodes not in feed.
+  switch ($source->importer->processor->config['update_non_existant']) {
+    case FEEDS_UNPUBLISH_NON_EXISTANT:
+      feeds_after_import_unpublish($feedNodes);
+      break;
+    case FEEDS_REMOVE_NON_EXISTANT:
+      feeds_after_import_remove($feedNodes);
+      break;
+    case FEEDS_SKIP_NON_EXISTANT:
+    default:
+    break;
+  }
+}
+
+/**
+ * Unpublishes an array of node ids.
+ *
+ * @param $feedNodes array
+ *   An array containing node ids.
+ */
+function feeds_after_import_unpublish($feedNodes) {
+  $counter = 0;
+  foreach ($feedNodes as $nid) {
+    $node = node_load($nid);
+    if ($node->status == 0) {
+      continue;
+    }
+    node_unpublish_action($node);
+    node_save($node);
+    $counter++;
+  }
+  drupal_set_message($counter . " item(s) unpublished");
+}
+
+/**
+ * Removes an array of node ids.
+ *
+ * @param $feedNodes array
+ *   An array containing node ids.
+ */
+function feeds_after_import_remove($feedNodes) {
+  foreach ($feedNodes as $nid) {
+    node_delete($nid);
+  }
+  drupal_set_message(count($feedNodes) . " item(s) removed");
+}
+
+/**
  * Logs to a file like /tmp/feeds_my_domain_org.log in temporary directory.
  */
 function feeds_dbg($msg) {
diff --git a/plugins/FeedsNodeProcessor.inc b/plugins/FeedsNodeProcessor.inc
index b363607..2fdef97 100644
--- a/plugins/FeedsNodeProcessor.inc
+++ b/plugins/FeedsNodeProcessor.inc
@@ -9,6 +9,25 @@
  * Creates nodes from feed items.
  */
 class FeedsNodeProcessor extends FeedsProcessor {
+
+   /**
+   * Returns a list of nid's that originated from the FeedSource.
+   *
+   * @param $source object
+   *   Feed srouce object.
+   *
+   * @return array
+   *   Node ids.
+   */
+  public function getFeedNids(FeedsSource $source) {
+    $nids = array();
+    $results = db_query("SELECT entity_id FROM {feeds_item} WHERE id = :id", array(':id' => $source->id));
+    while ($result = $results->fetchAssoc()) {
+      $nids[$result['entity_id']] = $result['entity_id'];
+    }
+    return $nids;
+  }
+
   /**
    * Define entity type.
    */
@@ -127,6 +146,7 @@ class FeedsNodeProcessor extends FeedsProcessor {
       'content_type' => $type,
       'expire' => FEEDS_EXPIRE_NEVER,
       'author' => 0,
+      'update_non_existant' => FEEDS_SKIP_NON_EXISTANT,
     ) + parent::configDefaults();
   }
 
@@ -165,6 +185,17 @@ class FeedsNodeProcessor extends FeedsProcessor {
       FEEDS_REPLACE_EXISTING => 'Replace existing nodes',
       FEEDS_UPDATE_EXISTING => 'Update existing nodes (slower than replacing them)',
     );
+    $form['update_non_existant'] = array(
+      '#type' => 'radios',
+      '#title' => t('Update nodes missing in the feed'),
+      '#description' => t('Select how nodes missing in the feed should be updated.'),
+      '#options' => array(
+        FEEDS_SKIP_NON_EXISTANT => 'Skip non existant nodes',
+        FEEDS_UNPUBLISH_NON_EXISTANT => 'Unpublish non existant nodes',
+        FEEDS_REMOVE_NON_EXISTANT => 'Remove non existant nodes',
+      ),
+      '#default_value' => $this->config['update_non_existant'],
+    );
     return $form;
   }
 
diff --git a/plugins/FeedsProcessor.inc b/plugins/FeedsProcessor.inc
index 029f9f4..b43c76a 100644
--- a/plugins/FeedsProcessor.inc
+++ b/plugins/FeedsProcessor.inc
@@ -5,6 +5,10 @@
 define('FEEDS_SKIP_EXISTING', 0);
 define('FEEDS_REPLACE_EXISTING', 1);
 define('FEEDS_UPDATE_EXISTING', 2);
+// Update mode for non-existant items.
+define('FEEDS_SKIP_NON_EXISTANT', 3);
+define('FEEDS_UNPUBLISH_NON_EXISTANT', 4);
+define('FEEDS_REMOVE_NON_EXISTANT', 5);
 
 // Default limit for creating items on a page load, not respected by all
 // processors.
@@ -23,6 +27,9 @@ abstract class FeedsProcessor extends FeedsPlugin {
    * @defgroup entity_api_wrapper Entity API wrapper.
    */
 
+
+  protected $processed_nids = array();
+
   /**
    * Entity type this processor operates on.
    */
@@ -102,9 +109,12 @@ abstract class FeedsProcessor extends FeedsPlugin {
     $state = $source->state(FEEDS_PROCESS);
 
     while ($item = $parser_result->shiftItem()) {
-      if (!($entity_id = $this->existingEntityId($source, $parser_result)) ||
-           ($this->config['update_existing'] != FEEDS_SKIP_EXISTING)) {
+      $entity_id = $this->existingEntityId($source, $parser_result);
+      if ($entity_id != 0) {
+        $this->processed_nids[] = $entity_id;
+      }
 
+      if (!($entity_id) || ($this->config['update_existing'] != FEEDS_SKIP_EXISTING)) {
         // Only proceed if item has actually changed.
         $hash = $this->hash($item);
         if (!empty($entity_id) && $hash == $this->getHash($entity_id)) {
@@ -139,6 +149,9 @@ abstract class FeedsProcessor extends FeedsPlugin {
             // Track progress.
             if (empty($entity_id)) {
               $state->created++;
+              if (is_numeric($entity->nid)) {
+                $this->processed_nids[] = $entity->nid;
+              }
             }
             else {
               $state->updated++;
