# Rake doesnt remove pinned posts?

**URL:** <https://meta.discourse.org/t/rake-doesnt-remove-pinned-posts/218313>\
**Category:** Support\
**Created:** [February 16, 2022, 3:41am UTC](https://meta.discourse.org/t/rake-doesnt-remove-pinned-posts/218313 "2022-02-16T03:41:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dill/32/250102_2.png) [@Dill](https://meta.discourse.org/u/Dill)\
**Post date:** [February 16, 2022, 3:41am UTC](https://meta.discourse.org/t/rake-doesnt-remove-pinned-posts/218313/1 "2022-02-16T03:41:56Z")

</div>

Hello! I recently ran the:

`rake destroy:topics_all_categories` command to do some spring cleaning (i actually needed to)

But I noticed that pinned topics were still visible.

Luckily I only pinned a couple posts. They were still visible, broken, but still there.

Was this a browser cache thing or did it actually not fully delete these posts?

---

<div class="post-metadata">

**Author:** ![cocococosti](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cocococosti/32/231474_2.png) [@cocococosti](https://meta.discourse.org/u/cocococosti)\
**Post date:** [February 16, 2022, 4:16am UTC](https://meta.discourse.org/t/rake-doesnt-remove-pinned-posts/218313/2 "2022-02-16T04:16:15Z")

</div>

Looks like pinned topics are not deleted: [discourse/app/services/destroy\_task.rb at 1ea19a4d51d074f759cab33b6324537ca1936ee7 · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/1ea19a4d51d074f759cab33b6324537ca1936ee7/app/services/destroy_task.rb#L15) I’ve never run this task before but, by looking at the code, the topics shouldn’t look broken, they are just not deleted. Maybe @blake knows more.

---

<div class="post-metadata">

**Author:** ![Dill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dill/32/250102_2.png) [@Dill](https://meta.discourse.org/u/Dill)\
**Post date:** [February 16, 2022, 4:34am UTC](https://meta.discourse.org/t/rake-doesnt-remove-pinned-posts/218313/3 "2022-02-16T04:34:47Z")

</div>

Hmmm, in that case there should be an --include-pinned sort of flag. That could be useful.

---

<div class="post-metadata">

**Author:** ![Dill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dill/32/250102_2.png) [@Dill](https://meta.discourse.org/u/Dill)\
**Post date:** [February 16, 2022, 4:46am UTC](https://meta.discourse.org/t/rake-doesnt-remove-pinned-posts/218313/4 "2022-02-16T04:46:27Z")

</div>

Perhaps the reason the pinned posts looked broken was related to the reason I had to destroy the posts in the first place.

I wanted to start fresh after changing the forum subdomain name. But ofc keep the settings and categories. So that could have resulted in some of the broken-ness that I experienced.
