Remove attachments from RocketChat database

Hello everyone.
Duplicate my post from GitHub here.
I have RocketChat 0.71.1
Located on The installation done from the docker and controlled by kubernates.
The database is mongo v4.0.4.
For a long time the type of storage was GridFS (save to database) for downloading files. Now the download type has changed to Google Cloud Storage.
How can I correctly remove attachments from the Mongo database and RocketChat does not break down?
I find 6 collections about attachments in DB:
But don know what to do with this. Searched everywhere but nowhere is there a solution.
If you know, tell me please how to solve this problem.

1 Like

The actual files would be in the uploads.chunks and uploads.files.

Note removing will likely lead to them just not able to load in Rocket.Chat. Removing beyond that is a bit more complicated.

Did you find a solution @Mix @aaron.ogle ? I’m also looking for this exact issue. See here: How to delete all rocketchat_uploads so far

You have retention policies nowadays to do the job.

No. We decided not to touch these files and left them as they are.
Now we have a very large dump of the database … (