I'm a bureaucrat on Wiki site. The site has a number of deleted files, and I'd like to expunge them. For example, there are 27 files in the history of one particular file:

enter image description here

There's no need for the extensive history; there's no need for the additional storage overhead; and there's no need to allow someone to revert to an old version of the file.

I think I found a wiki article covering the subject at Wikipedia:Files for deletion, but it sounds like (to me) that {{ffd|log=2014 July 23}} will delete the current file and past files. And its not clear to me if ffd expenges the old files.

How does one expunge the deleted files while leaving the current file in tact?

2 Answers 2


Your question is unclear, and appears to be based on several misunderstandings of how the software works. Assuming I'm guessing correctly:

  1. You have a website running the MediaWiki software, and this site is not one of the ones operated by the Wikimedia Foundation.
  2. You have reasonably high privileges within the software, but no privileges outside the software.
  3. You want to remove deleted files from disk.

MediaWiki is designed to keep a complete history of everything that has ever been done through the software, such that anything that can be done, can be undone. This means that, for example, "deleted" content is not actually deleted, but merely restricted in who is permitted to view it. In order to permanently delete content, you need to contact your wiki's system administrator, who can remove the files from the disk and perform the database operations needed to eliminate references to them.

The page you link to and the {{ffd}} template have no technical bearing on deletion, permanent or otherwise, they're just part of the English Wikipedia's social procedures regarding MediaWiki-level deletion.

Edit: Given the details in your update, this isn't something that can be done through the default MediaWiki interface. The easy way to completely remove old revisions is to delete the old revisions of the file (the file history has "delete" links for this), and then have your system administrator remove them from MediaWiki's deleted file store (the deleted/ subdirectory of the images directory). This may cause problems if you try to undelete or otherwise access the deleted revisions of the file, but should otherwise be harmless.

The other option is to install an extension that does permanent deletion of files/pages, but none of the ones I looked at permitted deleting selective revisions. There are ways to get around this by splitting a file's upload history, but they're complicated and I'm not entirely sure how to do it.

  • Thanks Mark. I'm sorry the question is unclear. How can I make it more clear?
    – user40589
    Commented Jul 23, 2014 at 4:12
  • "MediaWiki is designed to keep a complete history of everything..." - OK, I am aware of that. I'm trying to modify the behavior. I added the reasons I am trying to modify the behavior to the question. I hope that clears things up.
    – user40589
    Commented Jul 23, 2014 at 5:00
  • "The page you link to and the {{ffd}} template" - OK, thanks. That's the only documentation I could find that approached expunging a file.
    – user40589
    Commented Jul 23, 2014 at 5:01

Just run php maintenance/deleteArchivedFiles.php --delete.

Some background for the curious. Back in the day, MediaWiki didn't preserve old versions of files. This feature has been added less then a decade ago and the Wikimedia sysadmins originally said they would consider purging the old files every now and then, but there never was a need. (IIRC this was around 2008.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.