# How to make an image orphaned so that it gets removed?

**URL:** https://meta.discourse.org/t/how-to-make-an-image-orphaned-so-that-it-gets-removed/79231
**Category:** Support
**Created:** [January 29, 2018, 12:52am UTC](https://meta.discourse.org/t/how-to-make-an-image-orphaned-so-that-it-gets-removed/79231 "2018-01-29T00:52:45Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [January 29, 2018, 8:18am UTC](https://meta.discourse.org/t/how-to-make-an-image-orphaned-so-that-it-gets-removed/79231/3 "2018-01-29T08:18:14Z")

</div>

All the details are available in this job

> <https://github.com/discourse/discourse/blob/main/app/jobs/scheduled/clean_up_uploads.rb>

TL;DR: an image is orphaned if and only if it’s not referenced

- in the latest version of a post
- in a draft
- in a queued post
- in a logo site setting
- in a custom emoji
- in a theme
- in a user avatar/background/card image
- in a category logo/background image

---

_[View the full topic](https://meta.discourse.org/t/how-to-make-an-image-orphaned-so-that-it-gets-removed/79231)._
