KB1049 - Finding and Removing Orphaned Files

Deleted files can still take up space in your Moodle course.

Large media files (especially videos) that were deleted from an activity or resource in your course may still remain linked to the resource or activity in Moodle's database. These files are known as orphans, and can inflate your course size on disc.

Removing orphaned files will make your course backup archives smaller and faster to restore.
Once you find and delete an orphaned file, Moodle's automatic "Garbage Collector" process will clear the orphaned file off of the system completely.

This video describes how you can find and delete orphaned files in your Moodle course: