# How to clean staff action logs?

**URL:** <https://meta.discourse.org/t/how-to-clean-staff-action-logs/51305>\
**Category:** Support\
**Created:** [October 9, 2016, 5:28pm UTC](https://meta.discourse.org/t/how-to-clean-staff-action-logs/51305 "2016-10-09T17:28:52Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bek/32/61660_2.png) [@bek](https://meta.discourse.org/u/bek)\
**Post date:** [October 9, 2016, 5:28pm UTC](https://meta.discourse.org/t/how-to-clean-staff-action-logs/51305/1 "2016-10-09T17:28:52Z")

</div>

Hey!

Is it possible to clean staff action logs? Immh, or is there any option like “delete staff actions whichs older than 30 days” ?

💌

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [October 9, 2016, 5:44pm UTC](https://meta.discourse.org/t/how-to-clean-staff-action-logs/51305/2 "2016-10-09T17:44:45Z")

</div>

No, this isn’t possible.

---

<div class="post-metadata">

**Author:** ![bek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bek/32/61660_2.png) [@bek](https://meta.discourse.org/u/bek)\
**Post date:** [October 9, 2016, 10:02pm UTC](https://meta.discourse.org/t/how-to-clean-staff-action-logs/51305/3 "2016-10-09T22:02:41Z")

</div>

I just need to hack it. And then it will be possible imho.

---

<div class="post-metadata">

**Author:** ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)\
**Post date:** [October 9, 2016, 11:26pm UTC](https://meta.discourse.org/t/how-to-clean-staff-action-logs/51305/4 "2016-10-09T23:26:19Z")

</div>

> [@bek](#):
>
> I just need to hack it. And then it will be possible imho

I guess this is true for everything in life my friend.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [October 10, 2016, 12:50am UTC](https://meta.discourse.org/t/how-to-clean-staff-action-logs/51305/5 "2016-10-10T00:50:38Z")

</div>

You could probably truncate this table without too much risk.

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [October 10, 2016, 4:36am UTC](https://meta.discourse.org/t/how-to-clean-staff-action-logs/51305/6 "2016-10-10T04:36:31Z")

</div>

I’m a bit curious why you would want to clean the logs. We’ve run into cases where looking back at actions 1+ years ago was not only useful but actually _critical_ in answering questions that come up when our memory is failing us.

---

<div class="post-metadata">

**Author:** ![bek](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bek/32/61660_2.png) [@bek](https://meta.discourse.org/u/bek)\
**Post date:** [October 11, 2016, 12:48am UTC](https://meta.discourse.org/t/how-to-clean-staff-action-logs/51305/7 "2016-10-11T00:48:57Z")

</div>

OK. This is solved via `UserHistory.destroy_all`.

---

<div class="post-metadata">

**Author:** ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)\
**Post date:** [October 11, 2016, 7:36am UTC](https://meta.discourse.org/t/how-to-clean-staff-action-logs/51305/8 "2016-10-11T07:36:14Z")

</div>


