Independent directory, made by the developer of Vulpo. Not affiliated with Home Assistant or the Open Home Foundation.

About

Retention Cleaner deletes old files from configured folders once they pass a set retention period. Each folder rule becomes a device with sensors for file counts and sizes, a path availability check, buttons for manual scans and cleanups, and controls for adjusting the rule while Home Assistant runs. Rules can filter by file pattern or by included and excluded extensions, keep a minimum number of newest files, cap the total files in a folder, and remove empty subfolders. A dry-run mode and a limit on deletions per run are available, and paths are restricted to the media and share folders. A daily run time is set for each rule, and the integration works locally. It is set up in the UI and installed through the Marketplace.

Automatic summary of the README and code of thomasgriebner/retention_cleaner. Something wrong, or are you the maintainer and want your own text here? Get in touch

Supports

  • Works locally Talks to your devices on your own network. No vendor cloud in between.

  • From the Marketplace Installed through the Marketplace, formerly HACS.

Provides

  • Switches
  • Sensors

Setting it up

Install it from the Marketplace and restart Home Assistant, then add it under Settings, Devices and services.

Retention Cleaner

  • Base path (must start with /media/ or /share/)
  • File pattern (glob) - leave empty if using extension filters
  • Only delete these extensions (e.g., .mp4,.jpg) - optional
  • Never delete these extensions (e.g., .mkv,.log) - optional
  • Retention days
  • Daily run time (HH:MM)
  • Dry run (do not delete)
  • Max deletes per run

Texts from the code of thomasgriebner/retention_cleaner.

From the README

Automatically clean up old files in Home Assistant based on retention rules. Perfect for managing camera recordings, snapshots, and backups without SSH or cron jobs.

⚠️ Important: This integration permanently deletes files. Always test with dry-run mode first.

  • Configurable retention policies per folder
  • Runtime configuration via UI entities (no restart needed)
  • Daily automated cleanup scheduling
  • Dry-run mode for safe testing
  • Extension filtering (include/exclude specific file types)
  • Minimum file protection and maximum file limits
  • Automatic empty directory cleanup
  • Storage monitoring sensors
  • Manual scan and cleanup buttons
  • Path safety restrictions (/media/ and /share/ only)
From the README of thomasgriebner/retention_cleaner, MIT License. Shortened.

Shows in Vulpo

Quick Toggle card, Button card, Chart card, Apple Watch, Control Center.

Information

Installs
55 sharing analytics
GitHub stars
10
Connection
Works locally
Upkeep
No update in 6 to 18 months
Version
v1.2.0,
Category
Sensors
Kind
Marketplace integration
Needs
Needs the Marketplace (HACS on 2026.10 and older)
Domain
retention_cleaner

You might also like

Independent directory, made by the developer of Vulpo. Not affiliated with Home Assistant or the Open Home Foundation. About these numbers