Bulk delete all redirects

Created on 29 March 2017, about 8 years ago
Updated 1 February 2025, 3 months ago

I believe previously in D6 and D7 that we had bulk operations for deleting URL redirects but they seem to be missing from the Drupal 8 module unless I'm being a complete idiot (feel free to prove me right and point me in the right direction).

Use case: I've had a site in development for 6 months and in that time much has changed including site structure and accompanying URLs. As we've had redirect switched on from install I've managed to accumulate a bunch of redirects which aren't really required (eg. /blog-article/foo-bar redirects to /blog/foo-bar) and so on.

Now I want to import a list of redirects from the pre-existing site and these are the only redirects that I need for launch and the thought of hand deleting the hundreds of redirects in the UI is making me feel ill!!

Can anyone let me know if this is on the horizon, if I've missed something or if this is out of scope for now just so that I can make a decision on how to proceed with this project for now? I really appreciate all your work on this module. Thank you!

Update 2025:

Methods used to delete all redirects:

Feature request
Status

Active

Version

1.0

Component

User interface

Created by

🇬🇧United Kingdom darren.fisher

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇰Denmark ressa Copenhagen

    I can delete 50 redirects at a time via /admin/config/search/redirect, but need to delete thousands of redirects.

    I ended up uninstalling and reinstalling the Redirect module, since it requires that you delete all redirects via /admin/modules/uninstall/entity/redirect, when you try to uninstall it:

    $ drush un redirect
    
    In PmCommands.php line 224:                                                                                                                    
      redirect: There is content for the entity type: Redirect. <a href="/admin/modules/uninstall/entity/redirect">Remove redirect entities</a>.                                                                            
    Failed to run drush pm:uninstall redirect: exit status 1
    

    Or is there another method, via the GUI, or do I need to add a Views Bulk Operation view, with a Redirect plugin?

Production build 0.71.5 2024