I run a private Mastodon Instance. The server gives me the option to automatically delete the media-cache after a given number of days (I have it set to 180 days). If the data is needed again, it will be pulled from the original instance. Again. If still available.
An additional setting is the deletion of the federated content at all, which is saved on my server. This probably cannot be reverted, as the server doesn’t know anymore what to pull from what server… I have this setting at 365 days.
Additionally I can set my personal account to auto delete my own posts after a given time. With being able to set some excludes (favorited, bookmarked, posts which got a minimum of likes, …). But this is not a server setting, it’s an account setting.
Social media does not need to be saved forever. :)