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.


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.