# Is there a way to delete old/irrelevant uploads?

**URL:** https://meta.discourse.org/t/is-there-a-way-to-delete-old-irrelevant-uploads/49284
**Category:** Support
**Created:** [26 augustus 2016 om 16:12 UTC](https://meta.discourse.org/t/is-there-a-way-to-delete-old-irrelevant-uploads/49284 "2016-08-26T16:12:52Z")
**Posts on this page:** 6
**Page:** 2

<div class="post-metadata">

### Author: ![MerryMinstrel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merryminstrel/32/56896_2.png) [@MerryMinstrel](https://meta.discourse.org/u/MerryMinstrel)
#### Post date: [19 april 2019 om 16:03 UTC](https://meta.discourse.org/t/is-there-a-way-to-delete-old-irrelevant-uploads/49284/21 "2019-04-19T16:03:22Z")

</div>

Well my problem did not disappear by it’s self. I had to manually delete my pre-S3-migration uploads to free some disk space. That did the trick, but in the process some of the oldest user avatar pictures were lost.

Right now all of my file uploads are stored in S3. I have not checked if avatar pictures are deleted properly from my instance. At least I have not noticed any noticeable buildup in local upload size.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [19 april 2019 om 20:55 UTC](https://meta.discourse.org/t/is-there-a-way-to-delete-old-irrelevant-uploads/49284/22 "2019-04-19T20:55:41Z")

</div>

When you moved to s3 was `rake uploads:migrate_to_s3` run? Were all pre-s3 uploads lost?

---

<div class="post-metadata">

### Author: ![MerryMinstrel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merryminstrel/32/56896_2.png) [@MerryMinstrel](https://meta.discourse.org/u/MerryMinstrel)
#### Post date: [29 april 2019 om 11:28 UTC](https://meta.discourse.org/t/is-there-a-way-to-delete-old-irrelevant-uploads/49284/23 "2019-04-29T11:28:09Z")

</div>

No, they were copied to S3 and links in posts pointed to S3. My problem was that afterwards these files were not deleted from the local hard drive.

---

<div class="post-metadata">

### Author: ![markersocial](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/markersocial/32/170136_2.png) [@markersocial](https://meta.discourse.org/u/markersocial)
#### Post date: [12 juni 2019 om 14:48 UTC](https://meta.discourse.org/t/is-there-a-way-to-delete-old-irrelevant-uploads/49284/24 "2019-06-12T14:48:02Z")

</div>

I’ve done one migration of uploads to s3 today with a small forum to test the waters. The old local uploads don’t seem to clear out automatically (if the CleanUpUploads job runs once per hour) with the ‘clean up uploads’ enabled unfortunately. I’d guess that this is because it’s checking for upload orphans in the S3 bucket exclusively once the migration is complete. I can see the old local files and subfolders when I navigate to:

```
/var/discourse/shared/standalone/uploads/default/optimized/
/var/discourse/shared/standalone/uploads/default/original/

```

---

<div class="post-metadata">

### Author: ![Overgrow](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/overgrow/32/478189_2.png) [@Overgrow](https://meta.discourse.org/u/Overgrow)
#### Post date: [25 februari 2020 om 14:01 UTC](https://meta.discourse.org/t/is-there-a-way-to-delete-old-irrelevant-uploads/49284/25 "2020-02-25T14:01:48Z")

</div>

I’ve changed my retina settings (`responsive_post_image_sizes`)and remove 2.0x option. How can I remove now unused generated optimized thumbnails? Is it done exclusively through rebake:posts? Thanks..

> [@Retina image inline attachments](https://meta.discourse.org/t/retina-image-inline-attachments/12745/10):
>
> This is now implemented!!! confetti_ball Before: After: per: We resize to 1.5x and 2.0x when creating the SRCSET. You can configure this as needed using the [responsive post image sizes](https://github.com/discourse/discourse/commit/0e10b47618f8a934ad18b4e74edabff16591f089) site setting.

---

<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: [27 oktober 2022 om 19:49 UTC](https://meta.discourse.org/t/is-there-a-way-to-delete-old-irrelevant-uploads/49284/28 "2022-10-27T19:49:15Z")

</div>



[Vorige pagina](https://meta.discourse.org/t/is-there-a-way-to-delete-old-irrelevant-uploads/49284.md?page=1)
