Removing deleted documents

Hi Everyone!

M-Files store deleted documents, and as far as I know never delete them permanenty. Is there any way to remove all the deleted documents in one go? Or even better, with a job?

I know users with administrator privligies can remove documents permamenty but we got way too much documents to remove and we would like to permanenty delete every deleted documents which is older than last year.

  • You can use the Content Replication and Archiving feature in M-Files Admin to do this, either as a one-time job or as a continuous scheduled job. The search filter for the export job would be something like "Deleted = Yes" and "DaysFrom(Deleted) > 365" and you would enable the "Destroy exported objects after exporting" option.

    Note that the export job always creates a content package, so you would still have to find a way to delete this content package to get completely rid of the deleted content. The admin user can delete the package from disk if this is done as a one-time job, but if you run this as a scheduled job you may need to look for a Windows script or other such solution to delete the package. (This is assuming you are running an on-prem server; with a cloud vault the process is a bit different.)

  • Thank you! This seems like would help a lot. I will try this out soon and check back.

  • If the documents have been deleted, they do not get any actions if they are not replicated and, in that process, also removed from the document vault. The admin can search the deleted documents, and the admin can "mass delete" them. When this is done, the last step is to run the "Optimize Database (Thorough)" maintenance job from the M-Files Admin tool, purging the destroyed objects from the SQL database if the SQL Server is used as data storage. This also shrinks the transaction log.