# How to automate deletion of old vCenter snapshots?

**URL:** <https://forum.ansible.com/t/how-to-automate-deletion-of-old-vcenter-snapshots/43665>\
**Category:** Get Help\
**Tags:** vmware\
**Created:** [July 1, 2025, 2:44pm UTC](https://forum.ansible.com/t/how-to-automate-deletion-of-old-vcenter-snapshots/43665 "2025-07-01T14:44:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shanemhartley](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shanemhartley/32/7786_2.png) [@shanemhartley](https://forum.ansible.com/u/shanemhartley)\
**Post date:** [July 1, 2025, 2:44pm UTC](https://forum.ansible.com/t/how-to-automate-deletion-of-old-vcenter-snapshots/43665/1 "2025-07-01T14:44:31Z")

</div>

How do I remove old snapshots, say older than 30 days?

The only thing i see in the vmware.vmware collection is the guest\_info module, which gives you the creation\_time, but it’s a big long date\_time object.

Is there an easy way to automate old snapshot removals?

---

<div class="post-metadata">

**Author:** ![mariolenz](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/mariolenz/32/108_2.png) [@mariolenz](https://forum.ansible.com/u/mariolenz)\
**Post date:** [July 1, 2025, 3:46pm UTC](https://forum.ansible.com/t/how-to-automate-deletion-of-old-vcenter-snapshots/43665/2 "2025-07-01T15:46:06Z")

</div>

> [@shanemhartley](#):
>
> it’s a big long date\_time object

Sorry, I don’t have a way to check this right now. What do you mean by a “long date\_time object”? Something like `2018-02-10T14:48:31.999459+00:00`?
