# 如何删除数千条个人消息？

**URL:** https://meta.discourse.org/t/how-to-delete-thousands-of-personal-messages/162747
**Category:** Support
**Tags:** personal-messages
**Created:** [2020年九月2日 07:12 UTC](https://meta.discourse.org/t/how-to-delete-thousands-of-personal-messages/162747 "2020-09-02T07:12:42Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![IAmGav](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/iamgav/32/235598_2.png) [@IAmGav](https://meta.discourse.org/u/IAmGav)
#### Post date: [2020年九月2日 17:28 UTC](https://meta.discourse.org/t/how-to-delete-thousands-of-personal-messages/162747/3 "2020-09-02T17:28:41Z")

</div>

您可以一次性删除所有消息。

> rake destroy:private\_messages

参考：

> [@Administrative Bulk Operations](https://meta.discourse.org/t/administrative-bulk-operations/118349#heading--16):
>
> Below you will find a collection of bulk operations that can be initiated from the command line. You will need SSH access, so if you are a hosted customer, you will need to contact the Discourse team about running these commands. warning Before working with the console it is extremely important that you have a recent backup. Mistakes can always happen! First thing to do is enter your site’s container: cd /var/discourse ./launcher enter app Additional Guides: [Performing bulk actions a…](https://meta.discourse.org/t/performing-bulk-actions-as-a-moderator/272832)

---

_[View the full topic](https://meta.discourse.org/t/how-to-delete-thousands-of-personal-messages/162747)._
