diff --git a/src/AliasStorageHelper.php b/src/AliasStorageHelper.php
index 25d4241..ac635c3 100644
--- a/src/AliasStorageHelper.php
+++ b/src/AliasStorageHelper.php
@@ -246,7 +246,7 @@ class AliasStorageHelper implements AliasStorageHelperInterface {
    * @param int[] $pids
    *   An array of path IDs to delete.
    */
-  protected function deleteMultiple($pids) {
+  public function deleteMultiple($pids) {
     foreach ($pids as $pid) {
       $this->aliasStorage->delete(array('pid' => $pid));
     }
diff --git a/src/AliasTypeBatchUpdateInterface.php b/src/AliasTypeBatchUpdateInterface.php
index 42f5544..5f518ac 100644
--- a/src/AliasTypeBatchUpdateInterface.php
+++ b/src/AliasTypeBatchUpdateInterface.php
@@ -3,12 +3,13 @@
 namespace Drupal\pathauto;
 
 /**
- * Alias types that support batch updates.
+ * Alias types that support batch updates and deletions.
  */
 interface AliasTypeBatchUpdateInterface extends AliasTypeInterface {
 
   /**
    * Gets called to batch update all entries.
+   *
    * @param string $action
    *   One of:
    *   - 'create' to generate a URL alias for paths having none.
@@ -19,4 +20,12 @@ interface AliasTypeBatchUpdateInterface extends AliasTypeInterface {
    */
   public function batchUpdate($action, &$context);
 
+  /**
+   * Gets called to batch delete all entries.
+   *
+   * @param array $context
+   *   Batch context.
+   */
+  public function batchDelete(&$context);
+
 }
diff --git a/src/Form/PathautoAdminDelete.php b/src/Form/PathautoAdminDelete.php
index 660d82f..a230525 100644
--- a/src/Form/PathautoAdminDelete.php
+++ b/src/Form/PathautoAdminDelete.php
@@ -49,21 +49,21 @@ class PathautoAdminDelete extends FormBase {
    * {@inheritdoc}
    */
   public function buildForm(array $form, FormStateInterface $form_state) {
-    $form['delete'] = array(
+    $form['delete'] = [
       '#type' => 'fieldset',
       '#title' => $this->t('Choose aliases to delete'),
       '#tree' => TRUE,
-    );
+    ];
 
     // First we do the "all" case.
     $storage_helper = \Drupal::service('pathauto.alias_storage_helper');
     $total_count = $storage_helper->countAll();
-    $form['delete']['all_aliases'] = array(
+    $form['delete']['all_aliases'] = [
       '#type' => 'checkbox',
       '#title' => $this->t('All aliases'),
       '#default_value' => FALSE,
-      '#description' => $this->t('Delete all aliases. Number of aliases which will be deleted: %count.', array('%count' => $total_count)),
-    );
+      '#description' => $this->t('Delete all aliases. Number of aliases which will be deleted: %count.', ['%count' => $total_count]),
+    ];
 
     // Next, iterate over all visible alias types.
     $definitions = $this->aliasTypeManager->getVisibleDefinitions();
@@ -72,20 +72,34 @@ class PathautoAdminDelete extends FormBase {
       /** @var \Drupal\pathauto\AliasTypeInterface $alias_type */
       $alias_type = $this->aliasTypeManager->createInstance($id);
       $count = $storage_helper->countBySourcePrefix($alias_type->getSourcePrefix());
-      $form['delete']['plugins'][$id] = array(
+      $form['delete']['plugins'][$id] = [
         '#type' => 'checkbox',
         '#title' => (string) $definition['label'],
         '#default_value' => FALSE,
-        '#description' => $this->t('Delete aliases for all @label. Number of aliases which will be deleted: %count.', array('@label' => (string) $definition['label'], '%count' => $count)),
-      );
+        '#description' => $this->t('Delete aliases for all @label. Number of aliases which will be deleted: %count.', ['@label' => (string) $definition['label'], '%count' => $count]),
+      ];
     }
 
+    $form['options'] = [
+      '#type' => 'fieldset',
+      '#title' => $this->t('Delete options'),
+      '#tree' => TRUE,
+    ];
+
+    // Provide checkbox for not deleting custom aliases.
+    $form['options']['keep_custom_aliases'] = [
+      '#type' => 'checkbox',
+      '#title' => $this->t('Only delete automatically generated aliases'),
+      '#default_value' => TRUE,
+      '#description' => $this->t('When checked, aliases which have been manually set are not affected by this mass-deletion.'),
+    ];
+
     // Warn them and give a button that shows we mean business.
-    $form['warning'] = array('#value' => '<p>' . $this->t('<strong>Note:</strong> there is no confirmation. Be sure of your action before clicking the "Delete aliases now!" button.<br />You may want to make a backup of the database and/or the url_alias table prior to using this feature.') . '</p>');
-    $form['buttons']['submit'] = array(
+    $form['warning'] = ['#value' => '<p>' . $this->t('<strong>Note:</strong> there is no confirmation. Be sure of your action before clicking the "Delete aliases now!" button.<br />You may want to make a backup of the database and/or the url_alias table prior to using this feature.') . '</p>'];
+    $form['buttons']['submit'] = [
       '#type' => 'submit',
       '#value' => $this->t('Delete aliases now!'),
-    );
+    ];
 
     return $form;
   }
@@ -94,17 +108,78 @@ class PathautoAdminDelete extends FormBase {
    * {@inheritdoc}
    */
   public function submitForm(array &$form, FormStateInterface $form_state) {
-    $storage_helper = \Drupal::service('pathauto.alias_storage_helper');
-    if ($form_state->getValue(['delete', 'all_aliases'])) {
-      $storage_helper->deleteAll();
+    $delete_all = $form_state->getValue(['delete', 'all_aliases']);
+    // Keeping custom aliases forces us to go the slow way to correctly check
+    // the automatic/manual flag.
+    if ($form_state->getValue(['options', 'keep_custom_aliases'])) {
+      $batch = [
+        'title' => $this->t('Bulk deleting URL aliases'),
+        'operations' => [['Drupal\pathauto\Form\PathautoAdminDelete::batchStart', [$delete_all]]],
+        'finished' => 'Drupal\pathauto\Form\PathautoAdminDelete::batchFinished',
+      ];
+
+      if ($delete_all) {
+        foreach (array_keys($form_state->getValue(['delete', 'plugins'])) as $id) {
+          $batch['operations'][] = ['Drupal\pathauto\Form\PathautoAdminDelete::batchProcess', [$id]];
+        }
+      }
+      else {
+        foreach (array_keys(array_filter($form_state->getValue(['delete', 'plugins']))) as $id) {
+          $batch['operations'][] = ['Drupal\pathauto\Form\PathautoAdminDelete::batchProcess', [$id]];
+        }
+      }
+
+      batch_set($batch);
+    }
+    else if ($delete_all) {
+      \Drupal::service('pathauto.alias_storage_helper')->deleteAll();
       drupal_set_message($this->t('All of your path aliases have been deleted.'));
     }
-    foreach (array_keys(array_filter($form_state->getValue(['delete', 'plugins']))) as $id) {
-      $alias_type = $this->aliasTypeManager->createInstance($id);
-      $storage_helper->deleteBySourcePrefix((string) $alias_type->getSourcePrefix());
-      drupal_set_message($this->t('All of your %label path aliases have been deleted.', array('%label' => $alias_type->getLabel())));
+    else {
+      $storage_helper = \Drupal::service('pathauto.alias_storage_helper');
+      foreach (array_keys(array_filter($form_state->getValue(['delete', 'plugins']))) as $id) {
+        $alias_type = $this->aliasTypeManager->createInstance($id);
+        $storage_helper->deleteBySourcePrefix((string) $alias_type->getSourcePrefix());
+        drupal_set_message($this->t('All of your %label path aliases have been deleted.', ['%label' => $alias_type->getLabel()]));
+      }
+    }
+  }
+
+  /**
+   * Batch callback; record if aliases of all types must be deleted.
+   */
+  public static function batchStart($delete_all, &$context) {
+    $context['results']['delete_all'] = $delete_all;
+    $context['results']['deletions'] = [];
+  }
+
+  /**
+   * Common batch processing callback for all operations.
+   */
+  public static function batchProcess($id, &$context) {
+    /** @var \Drupal\pathauto\AliasTypeBatchUpdateInterface $alias_type */
+    $alias_type = \Drupal::service('plugin.manager.alias_type')->createInstance($id);
+    $alias_type->batchDelete($context);
+  }
+
+  /**
+   * Batch finished callback.
+   */
+  public static function batchFinished($success, $results, $operations) {
+    if ($success) {
+      if ($results['delete_all']) {
+        drupal_set_message(t('All of your automatically generated path aliases have been deleted.'));
+      }
+      else if (isset($results['deletions'])) {
+        foreach (array_values($results['deletions']) as $label) {
+          drupal_set_message(t('All of your automatically generated %label path aliases have been deleted.', ['%label' => $label]));
+        }
+      }
+    }
+    else {
+      $error_operation = reset($operations);
+      drupal_set_message(t('An error occurred while processing @operation with arguments : @args', array('@operation' => $error_operation[0], '@args' => print_r($error_operation[0], TRUE))));
     }
-    $form_state->setRedirect('pathauto.admin.delete');
   }
 
 }
diff --git a/src/Plugin/pathauto/AliasType/EntityAliasTypeBase.php b/src/Plugin/pathauto/AliasType/EntityAliasTypeBase.php
index 66ffc3b..9412a93 100644
--- a/src/Plugin/pathauto/AliasType/EntityAliasTypeBase.php
+++ b/src/Plugin/pathauto/AliasType/EntityAliasTypeBase.php
@@ -6,12 +6,14 @@ use Drupal\Core\Database\Connection;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Entity\FieldableEntityInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
+use Drupal\Core\KeyValueStore\KeyValueFactoryInterface;
 use Drupal\Core\Language\LanguageManagerInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\Plugin\Context\Context;
 use Drupal\Core\Plugin\ContextAwarePluginBase;
 use Drupal\pathauto\AliasTypeBatchUpdateInterface;
 use Drupal\pathauto\AliasTypeInterface;
+use Drupal\pathauto\PathautoState;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -46,6 +48,13 @@ class EntityAliasTypeBase extends ContextAwarePluginBase implements AliasTypeInt
   protected $entityTypeManager;
 
   /**
+   * The key/value manager service.
+   *
+   * @var \Drupal\Core\KeyValueStore\KeyValueFactoryInterface
+   */
+  protected $keyValue;
+
+  /**
    * The database connection.
    *
    * @var \Drupal\Core\Database\Connection
@@ -74,14 +83,17 @@ class EntityAliasTypeBase extends ContextAwarePluginBase implements AliasTypeInt
    *   The language manager service.
    * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
    *   The entity manager service.
+   * @param \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value
+   *   The key/value manager service.
    * @param \Drupal\Core\Database\Connection $database
    *   The database connection.
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager, EntityTypeManagerInterface $entity_type_manager, Connection $database) {
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager, EntityTypeManagerInterface $entity_type_manager, KeyValueFactoryInterface $key_value, Connection $database) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->moduleHandler = $module_handler;
     $this->languageManager = $language_manager;
     $this->entityTypeManager = $entity_type_manager;
+    $this->keyValue = $key_value;
     $this->database = $database;
   }
 
@@ -96,6 +108,7 @@ class EntityAliasTypeBase extends ContextAwarePluginBase implements AliasTypeInt
       $container->get('module_handler'),
       $container->get('language_manager'),
       $container->get('entity_type.manager'),
+      $container->get('keyvalue'),
       $container->get('database')
     );
   }
@@ -179,6 +192,51 @@ class EntityAliasTypeBase extends ContextAwarePluginBase implements AliasTypeInt
   }
 
   /**
+   * {@inheritdoc}
+   */
+  public function batchDelete(&$context) {
+    if (!isset($context['sandbox']['current'])) {
+      $context['sandbox']['count'] = 0;
+      $context['sandbox']['current'] = 0;
+    }
+
+    $entity_type = $this->entityTypeManager->getDefinition($this->getEntityTypeId());
+    $id_key = $entity_type->getKey('id');
+
+    $query = $this->database->select($entity_type->get('base_table'), 'base_table');
+    $query->innerJoin('url_alias', 'ua', "CONCAT('" . $this->getSourcePrefix() . "' , base_table.$id_key) = ua.source");
+    $query->addField('base_table', $id_key, 'id');
+    $query->addField('ua', 'pid');
+    $query->condition('ua.pid', $context['sandbox']['current'], '>');
+    $query->orderBy('ua.pid');
+    $query->addTag('pathauto_bulk_delete');
+    $query->addMetaData('entity', $this->getEntityTypeId());
+
+    // Get the total amount of items to process.
+    if (!isset($context['sandbox']['total'])) {
+      $context['sandbox']['total'] = $query->countQuery()->execute()->fetchField();
+
+      // If there are no entities to delete, then stop immediately.
+      if (!$context['sandbox']['total']) {
+        $context['finished'] = 1;
+        return;
+      }
+    }
+
+    $query->range(0, 100);
+    $aliases = $query->execute()->fetchAll(\PDO::FETCH_ASSOC);
+
+    $this->bulkDelete($aliases);
+    $context['sandbox']['count'] += count(array_values($aliases));
+    $context['sandbox']['current'] = max(array_values($aliases));
+    $context['results']['deletions'][] = $this->getLabel();
+
+    if ($context['sandbox']['count'] != $context['sandbox']['total']) {
+      $context['finished'] = $context['sandbox']['count'] / $context['sandbox']['total'];
+    }
+  }
+
+  /**
    * Returns the entity type ID.
    *
    * @return string
@@ -192,7 +250,7 @@ class EntityAliasTypeBase extends ContextAwarePluginBase implements AliasTypeInt
    * Update the URL aliases for multiple entities.
    *
    * @param array $ids
-   *   An array of entity IDs IDs.
+   *   An array of entity IDs.
    * @param array $options
    *   An optional array of additional options.
    *
@@ -223,6 +281,29 @@ class EntityAliasTypeBase extends ContextAwarePluginBase implements AliasTypeInt
   }
 
   /**
+   * Delete the URL aliases for multiple entities.
+   *
+   * @param array $aliases
+   *   An array of entity aliases. Each alias is an array with two keys: id (the entity ID) and pid (the alias ID).
+   */
+  protected function bulkDelete(array $aliases) {
+    foreach ($aliases as $alias) {
+      $id_to_pid[$alias['id']] = $alias['pid'];
+    }
+
+    $collection = 'pathauto_state.' . $this->getEntityTypeId();
+    $states = $this->keyValue->get($collection)->getMultiple(array_keys($id_to_pid));
+
+    foreach (array_keys($id_to_pid) as $id) {
+      // Skip if pathauto processing is disabled.
+      if (isset($states[$id]) && $states[$id] == PathautoState::CREATE) {
+        $pids[] = $id_to_pid[$id];
+      }
+    }
+    \Drupal::service('pathauto.alias_storage_helper')->deleteMultiple($pids);
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function calculateDependencies() {
diff --git a/src/Plugin/pathauto/AliasType/ForumAliasType.php b/src/Plugin/pathauto/AliasType/ForumAliasType.php
index 85bb379..a572593 100644
--- a/src/Plugin/pathauto/AliasType/ForumAliasType.php
+++ b/src/Plugin/pathauto/AliasType/ForumAliasType.php
@@ -6,6 +6,7 @@ use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Database\Connection;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Extension\ModuleHandlerInterface;
+use Drupal\Core\KeyValueStore\KeyValueFactoryInterface;
 use Drupal\Core\Language\LanguageManagerInterface;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -47,11 +48,15 @@ class ForumAliasType extends EntityAliasTypeBase implements ContainerFactoryPlug
    *   The language manager service.
    * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
    *   The entity manager service.
+   * @param \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value
+   *   The key/value manager service.
+   * @param \Drupal\Core\Database\Connection $database
+   *   The database service.
    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
    *   The config factory.
    */
-  public function __construct(array $configuration, $plugin_id, $plugin_definition, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager, EntityTypeManagerInterface $entity_type_manager, Connection $database, ConfigFactoryInterface $config_factory) {
-    parent::__construct($configuration, $plugin_id, $plugin_definition, $module_handler, $language_manager, $entity_type_manager, $database);
+  public function __construct(array $configuration, $plugin_id, $plugin_definition, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager, EntityTypeManagerInterface $entity_type_manager, KeyValueFactoryInterface $key_value, Connection $database, ConfigFactoryInterface $config_factory) {
+    parent::__construct($configuration, $plugin_id, $plugin_definition, $module_handler, $language_manager, $entity_type_manager, $key_value, $database);
     $this->configFactory = $config_factory;
   }
 
@@ -66,6 +71,7 @@ class ForumAliasType extends EntityAliasTypeBase implements ContainerFactoryPlug
       $container->get('module_handler'),
       $container->get('language_manager'),
       $container->get('entity_type.manager'),
+      $container->get('keyvalue'),
       $container->get('database'),
       $container->get('config.factory')
     );
diff --git a/src/Tests/PathautoMassDeleteTest.php b/src/Tests/PathautoMassDeleteTest.php
index a245159..59d2720 100644
--- a/src/Tests/PathautoMassDeleteTest.php
+++ b/src/Tests/PathautoMassDeleteTest.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\pathauto\Tests;
 
+use Drupal\pathauto\PathautoState;
 use Drupal\simpletest\WebTestBase;
 
 /**
@@ -76,6 +77,7 @@ class PathautoMassDeleteTest extends WebTestBase {
     $this->generateAliases();
     $edit = array(
       'delete[all_aliases]' => TRUE,
+      'options[keep_custom_aliases]' => FALSE,
     );
     $this->drupalPostForm('admin/config/search/path/delete_bulk', $edit, t('Delete aliases now!'));
     $this->assertText(t('All of your path aliases have been deleted.'));
@@ -92,6 +94,7 @@ class PathautoMassDeleteTest extends WebTestBase {
       $this->generateAliases();
       $edit = array(
         'delete[plugins][' . $pathauto_plugin . ']' => TRUE,
+        'options[keep_custom_aliases]' => FALSE,
       );
       $this->drupalPostForm('admin/config/search/path/delete_bulk', $edit, t('Delete aliases now!'));
       $alias_type = $manager->createInstance($pathauto_plugin);
@@ -112,23 +115,46 @@ class PathautoMassDeleteTest extends WebTestBase {
         }
       }
     }
+
+    // 3. Test deleting automatically generated aliases only.
+    $this->generateAliases();
+    $edit = array(
+      'delete[all_aliases]' => TRUE,
+      'options[keep_custom_aliases]' => TRUE,
+    );
+    $this->drupalPostForm('admin/config/search/path/delete_bulk', $edit, t('Delete aliases now!'));
+    $this->assertText(t('All of your automatically generated path aliases have been deleted.'));
+    $this->assertUrl('admin/config/search/path/delete_bulk');
+
+    // Make sure that only custom aliases still exist.
+    $aliases = \Drupal::database()->select('url_alias', 'ua')->fields('ua', ['source'])->execute()->fetchCol();
+    $this->assertEqual($aliases, ['/node/4', '/node/5'], 'Custom aliases still exist.');
   }
 
   /**
    * Helper function to generate aliases.
    */
   function generateAliases() {
+    // Delete all aliases to avoid duplicated aliases. They will be recreated below.
+    $this->deleteAllAliases();
+
     // We generate a bunch of aliases for nodes, users and taxonomy terms. If
     // the entities are already created we just update them, otherwise we create
     // them.
     if (empty($this->nodes)) {
       for ($i = 1; $i <= 5; $i++) {
-        $node = $this->drupalCreateNode();
+        // Set the alias of two nodes manually.
+        $settings = ($i > 3) ? ['path' => ['alias' => "/custom_alias_$i", 'pathauto' => PathautoState::SKIP]] : [];
+        $node = $this->drupalCreateNode($settings);
         $this->nodes[$node->id()] = $node;
       }
     }
     else {
       foreach ($this->nodes as $node) {
+        if ($node->id() > 3) {
+          // The alias is set manually.
+          $node->set('path', ['alias' => '/custom_alias_' . $node->id()]);
+        }
         $node->save();
       }
     }
