How to deal with ghost files?

I would like someone more experienced to answer some of my doubts, I found something wrong or maybe I’m wrong, yesterday I made several photo changes to a theme to personalize it, and later I made a backup, I noticed that the backup contained all the photos that I used it previously on the same topic, so it means that these photos that are no longer being used are somewhere on my server, therefore consuming resources, let’s say they are ghost files, they are just taking up space, the correct thing would not be for these files to be removed from total form of the system/server?

This is available and controlled by some settings. The default grace period is 48 hours so “yesterday” is too soon to tell.


Amazing, thank you very much for helping, sometimes it seems like silly questions but I’m new here, it’s amazing to know that I can count on everyone’s help and soon I’ll be able to help many too… Hugs friend