# How to bulk delete old entries using WP-CLI?

**URL:** <https://community.gravityforms.com/t/how-to-bulk-delete-old-entries-using-wp-cli/11209>\
**Category:** Get Help\
**Tags:** wp-cli, delete-entries, \-start\_date, \-end\_data\
**Created:** [November 18, 2021, 3:40am UTC](https://community.gravityforms.com/t/how-to-bulk-delete-old-entries-using-wp-cli/11209 "2021-11-18T03:40:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![chrishajer](https://sea2.discourse-cdn.com/flex020/user_avatar/community.gravityforms.com/chrishajer/32/88_2.png) [@chrishajer](https://community.gravityforms.com/u/chrishajer)\
**Post date:** [November 18, 2021, 4:44pm UTC](https://community.gravityforms.com/t/how-to-bulk-delete-old-entries-using-wp-cli/11209/2 "2021-11-18T16:44:04Z")

</div>

Hello @michaeledi - the listing of entries and the exporting of entries in the command line is the same as it is in the WordPress admin dashboard. You can’t show entries based on a start and end date, and the start and end date options are only available on export.

I think you will need to do this in two steps using the CLI:

1. export the entries to a csv file using the `--start_date` and `--end_date` parameters
2. read the entry IDs from that csv file into your `wp gf entry delete` command

I tried for a little bit to get this exactly right, but could only come up with a hacky method the relied upon me knowing which column in the CSV contains the entry ID. Someone with better shell skills could definitely make this happen. I will leave this open in case someone can add their own thoughts or approach. Thank you.

---

_[View the full topic](https://community.gravityforms.com/t/how-to-bulk-delete-old-entries-using-wp-cli/11209)._
