# Enable setting to allow admins to permanently delete data

**URL:** https://meta.discourse.org/t/enable-setting-to-allow-admins-to-permanently-delete-data/206678
**Category:** Self-Hosting
**Tags:** how-to, permanently-delete
**Created:** [October 21, 2021, 2:50pm UTC](https://meta.discourse.org/t/enable-setting-to-allow-admins-to-permanently-delete-data/206678 "2021-10-21T14:50:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [October 21, 2021, 2:50pm UTC](https://meta.discourse.org/t/enable-setting-to-allow-admins-to-permanently-delete-data/206678/1 "2021-10-21T14:50:28Z")

</div>

> 🔖 This is a guide on how to enable the setting for administrators to permanently delete data on a Discourse instance.
> 
> 🙋 Required user level: Admin

As of [v2026.4.0 Changelog | Discourse Releases](https://releases.discourse.org/changelog/v2026.4.0/?filter=permanently_delete&tab=feature) the site setting to allow admins to permanently delete data is no longer a hidden site setting.

To use this feature, enable the `can permanently delete` setting. However, please be aware of the risks involved with this feature — as the setting name suggests, **if you permanently delete a topic, post, or post revisions, there is no way to restore this content.** As such, there are a few safeguards in place:

## Enabling permanent deletion via the admin dashboard

To enable the setting using the admin dashboard,

1. Go to `Admin > Site Settings > Security`
2. Search for `can permanently delete`
3. Tick the checkbox  
 ![can permanently delete site setting](https://global.discourse-cdn.com/meta/original/4X/0/6/b/06b470a427aea473e0d7a47cf6b408160849530b.png)

## Enabling permanent deletion via the Rails console

To enable the setting using the Rails console, execute the following commands:

1. Access your Discourse application directory:

```plaintext
cd /var/discourse

```

1. Enter the app container:

```plaintext
./launcher enter app

```

1. Access the Rails console:

```plaintext
rails c

```

1. Set the site setting `can_permanently_delete` to `true`:

```plaintext
SiteSetting.can_permanently_delete = true

```

1. Exit the Rails console:

```plaintext
exit

```

1. Exit the app container:

```plaintext
exit

```

This change takes effect immediately, and no further action is required.

## Enabling permanent deletion via `app.yml`

Another way to enable permanent deletion is through the `app.yml` configuration file. Follow these steps:

1. Open the `app.yml` file located in your Discourse application directory.

2. Locate the `env:` section. You can find this under `DISCOURSE_HOSTNAME`.

3. Add the following line to enable permanent deletion:

4. Save the changes and execute the following command to rebuild your app:

Your changes will take effect once the rebuild process is complete.

> Last edited by @Moin 2026-05-14T03:04:10Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![Bathinda](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bathinda/32/135888_2.png) [@Bathinda](https://meta.discourse.org/u/Bathinda)
#### Post date: [August 16, 2024, 2:13pm UTC](https://meta.discourse.org/t/enable-setting-to-allow-admins-to-permanently-delete-data/206678/18 "2024-08-16T14:13:22Z")

</div>

“Delete Data” means all the topics, posts, uploads etc, everything will be deleted from our site and it’ll be just an empty new website?

* * *

Or it’d delete ‘Data’ container or something?

---

<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: [August 16, 2024, 2:25pm UTC](https://meta.discourse.org/t/enable-setting-to-allow-admins-to-permanently-delete-data/206678/19 "2024-08-16T14:25:19Z")

</div>

It refers to this feature - [Introducing permanently delete post functionality](https://meta.discourse.org/t/introducing-permanently-delete-post-functionality/207109)

It allows admins to hard delete posts/topics when enabled, rather than the normal soft-delete without it.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [April 30, 2026, 9:38am UTC](https://meta.discourse.org/t/enable-setting-to-allow-admins-to-permanently-delete-data/206678/21 "2026-04-30T09:38:49Z")

</div>

> [@Discourse](#):
>
> As such, there are a few safeguards in place:

It feels like something is missing here. Maybe it’s the information about the extra step when enabling the setting or the extra safeguards when deleting a post (5-minute wait or another admin, and the confirmation text you need to enter).
