# 有没有方法可以删除所有帖子的所有修订版本？

**URL:** <https://meta.discourse.org/t/is-there-a-way-to-remove-all-post-revisions-from-all-the-posts/70001>\
**Category:** Support\
**Created:** [2017年九月13日 20:02 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-all-post-revisions-from-all-the-posts/70001 "2017-09-13T20:02:29Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Morfik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/morfik/32/120704_2.png) [@Morfik](https://meta.discourse.org/u/Morfik)\
**Post date:** [2017年九月13日 20:44 UTC](https://meta.discourse.org/t/is-there-a-way-to-remove-all-post-revisions-from-all-the-posts/70001/6 "2017-09-13T20:44:58Z")

</div>

Ok, so it would be something like this, right?

```
discourse-# \connect discourse
discourse=# delete from post_revisions *;
discourse=# update posts set public_version=1 where public_version>1;
discourse=# update posts set version=1 where version>1;

```

---

_[View the full topic](https://meta.discourse.org/t/is-there-a-way-to-remove-all-post-revisions-from-all-the-posts/70001)._
