Is it safe to delete a file from the /data folder?

There is a need to delete large (>500Mb) files from the data folder - can I find all large files from the past years and safely delete them?

Hi @diztrancer and welcome to the Mattermost forums!

You can delete the attachments manually on the filesystem, but the posts with the references on the files will still be in the database so someone looking for an old post will find it and be unable to click on the attachment, f.ex.
The free editions unfortunately do not support housekeeping tasks like deletion of old posts and attachments, at least not in an easy way, but if you google for mattermost housekeeping you will find some GitHub projects where people wrote some scripts to do the work for you (but please be careful when you use them, it’s not official code, make sure to have a backup first).

If you do not care about the fact that your users could click on non-existent attachments anymore, it’s “safe” to delete them directly on the filesystem.

@agriesser Thank you !