What is the best way to have media files for a snapshot delete after 24 hrs

I would like a automation that would delete files that have been stored in my media files after 24 hrs, to the best of my knowlegde there is no command within home assistant that allows this to happen, however i did come across a topic using a shell command.

if that is the case that I need to use a shell command, my question is in two parts,

Part 1: What would be the command

Part 2: where would I put that command? would this be in a automation and a templete or in the config file?

thanks

@frenck if there was a select all button in the media file that would be appericated as well

Pleas don’t @ people like that. It is very annoying.

Sincerly sorry about that i wasnt sure if that was allowed

Read this. Point 16 in case it doesn’t take you to the correct section.

I wanted to reach out personally to apologise for inadvertently tagging someone in a recent thread. It was unintentional and I realise it may have led to unnecessary notifications or discomfort on your part. I assure you it was an oversight and I will be more mindful in the future to prevent a recurrence. Thank you for your understanding.