Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Commerce Order Cleanup module provides set of drush command to manage deletion of Commerce orders. It allows the user to delete by order status, changed date and type of line item in an order.
For example (with 7.x-1.2) using a Drush command you are able to delete orders containing "Product" product types that have an order status of 'Canceled' and were last changed between 6 and 7 months ago.