Skip to content

Nammurg/unraid-media-cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

Unraid Media Cleaner

Unraid Media Cleaner is a bash script designed to maintain clean media folders on your Unraid server. It removes non-video and non-subtitle files while preserving valid media files and empty directories for Sonarr/Radarr.

Features

  • Deletes temp/junk files and non-media files
  • Keeps all common video formats: mkv, mp4, avi, flv, ts, webm, mov, m4v, wmv, mpeg, mpg, m2ts, ogv, 3gp, vob
  • Keeps all common subtitle formats: srt, ass, sub, idx, vtt, ssa
  • Preserves empty directories for Sonarr/Radarr
  • Dry-run mode to preview deletions safely
  • Provides a per-extension summary of files removed

Usage

  1. Edit unraid-media-cleaner.sh to set your media folder paths.
  2. Run in dry-run mode to preview deletions: DRY_RUN=true ./unraid-media-cleaner.sh
  3. When ready, set DRY_RUN=false to perform actual cleanup.
  4. Optionally, schedule via the Unraid User Scripts plugin.

About

A bash script for Unraid that cleans media folders by removing non-video and non-subtitle files while preserving valid media files and empty directories for Sonarr/Radarr. Includes dry-run mode, per-extension summary, and supports all common video and subtitle formats.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages