# Introduce a way to also permanently delete the sensitive info from the staff logs

**URL:** https://meta.discourse.org/t/introduce-a-way-to-also-permanently-delete-the-sensitive-info-from-the-staff-logs/292546
**Category:** UX
**Tags:** completed, permanently-delete
**Created:** [November 15, 2023, 1:53pm UTC](https://meta.discourse.org/t/introduce-a-way-to-also-permanently-delete-the-sensitive-info-from-the-staff-logs/292546 "2023-11-15T13:53:26Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [January 22, 2024, 9:43pm UTC](https://meta.discourse.org/t/introduce-a-way-to-also-permanently-delete-the-sensitive-info-from-the-staff-logs/292546/2 "2024-01-22T21:43:18Z")

</div>

I don’t believe there is a way currently to do this from the UI. I think you would be able to delete the staff action itself through the rails console if you have access.

You can find the id for the staff action either by checking the staff logs json (`/admin/logs/staff_action_logs.json`) or using a [data explorer](https://meta.discourse.org/t/32566?silent=true) query to give you a list to pick it from:

```sql
SELECT *
FROM user_histories
WHERE action = 17 --action code for 'delete post'
ORDER BY created_at DESC

```

And then using that id in the rails console:

```plaintext
UserHistory.where(id:[ID]).delete_all

```

* * *

Though, reading your ask more closely, I think you could overwrite the ‘details’ section instead of deleting the log with something like this:

```plaintext
UserHistory.where(id:[ID]).update(details:"permanently deleted")

```

---

_[View the full topic](https://meta.discourse.org/t/introduce-a-way-to-also-permanently-delete-the-sensitive-info-from-the-staff-logs/292546)._
