In drupal commerce, the order will be created when a product is added to cart and the order will exist until the order is deleted or order status is changed to completed.
We have an e-commerce site in which most of the orders are idle in the shopping cart. So we decided to delete the order if the order is in the shopping cart for more than 'N' days or weeks. I have written a custom drush command for deleting the order.
The following code is used to delete an order if it is in the cart for more than 25 days.