# Disappearing messages

**URL:** <https://forum.mattermost.com/t/disappearing-messages/15091>\
**Category:** Troubleshooting\
**Created:** [February 15, 2023, 11:15am UTC](https://forum.mattermost.com/t/disappearing-messages/15091 "2023-02-15T11:15:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucyclhill](https://avatars.discourse-cdn.com/v4/letter/l/0ea827/32.png) [@lucyclhill](https://forum.mattermost.com/u/lucyclhill)\
**Post date:** [February 15, 2023, 11:15am UTC](https://forum.mattermost.com/t/disappearing-messages/15091/1 "2023-02-15T11:15:13Z")

</div>

Is there an option to either 1) send messages that auto-delete after a certain amount of time 2) set the whole server to wipe at interviews so data is deleted?

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [February 23, 2023, 3:45pm UTC](https://forum.mattermost.com/t/disappearing-messages/15091/2 "2023-02-23T15:45:02Z")

</div>

Hi @lucyclhill ,

auto-deleting messages are not supported at the moment.  
Do you mean “intervals” instead of “interviews” and if so, what exactly would you want to be wiped? All the channels and users or just posts in channels? If the latter is the case, should all channels be purged or just specific ones? What about direct message channels, f.ex., should they be excluded?

Can you maybe elaborate on the usecase?

---

<div class="post-metadata">

**Author:** ![lucyclhill](https://avatars.discourse-cdn.com/v4/letter/l/0ea827/32.png) [@lucyclhill](https://forum.mattermost.com/u/lucyclhill)\
**Post date:** [March 8, 2023, 1:50pm UTC](https://forum.mattermost.com/t/disappearing-messages/15091/3 "2023-03-08T13:50:41Z")

</div>

Hi there - yes at intervals we’d like to wipe all messages from the system - all channels and private messages. Thank you

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [March 10, 2023, 4:31am UTC](https://forum.mattermost.com/t/disappearing-messages/15091/4 "2023-03-10T04:31:38Z")

</div>

Using the paid versions (I think it requires an Enterprise edition), you can configure data retention policies which would allow you to have the system automatically delete posts older than the configure date (i.e. all posts older than 12 months in all channels).

For the free editions, there’s no such feature available and you would have to do that on your own. There are several projects out on GitHub that support tasks like that and you will also be able to find some housekeeping scripts, I did find these three after googling for a few seconds:

> **[GitHub - anton-johansson/mattermost-housekeeper: A cleanup tool for...](https://github.com/anton-johansson/mattermost-housekeeper)**
>
> A cleanup tool for Mattermost Team Edition. Contribute to anton-johansson/mattermost-housekeeper development by creating an account on GitHub.

> **[GitHub - bazzline/mattermost\_housekeeping: Free as in freedom mattermost...](https://github.com/bazzline/mattermost_housekeeping)**
>
> Free as in freedom mattermost housekeeping script to delete data older than x days from your local sever - GitHub - bazzline/mattermost\_housekeeping: Free as in freedom mattermost housekeeping scri...

> **[GitHub - aljazceru/mattermost-retention: Data retention /cleanup script for...](https://github.com/aljazceru/mattermost-retention)**
>
> Data retention /cleanup script for mattermost . Contribute to aljazceru/mattermost-retention development by creating an account on GitHub.

I have not used any of those so I cannot recommend one and they might as well just wipe your whole harddrive 🙂 So as always with scripts like these, check them first and make sure to have a backup in place before you run them on your production data.  
Maybe they also give you an idea of how to do it on your own directly in the database.
