A Python utility designed to reclaim disk space by identifying and deleting WAV samples that are not being used in your FL Studio projects.
As producers and developers, our sample libraries often grow to hundreds of gigabytes. Many of these samples are "stems" or datasets (like unmix stems) that contain identically named files (e.g., bass.wav, drums.wav) across different folders. Standard cleanup tools often fail to distinguish between them, or we simply don't know which folders are safe to delete.
This script parses through all your .flp files (excluding backups) and uses Strict Path Matching to cross-reference your sample library. It tells you:
- Which specific files are safe to delete.
- Which folders are entirely unused.
- How much disk space you can reclaim.
Important: This script requires Python 3.10.
Newer versions (3.11+) are currently incompatible with the underlying pyflp library due to an EventEnum error in the internal parser.
Install the required library via pip:
pip install pyflp-
Clone the repo:
git clone https://github.com/DirtyBeastAfterTheToad/fl-sample-purge.git cd fl-sample-purge -
Run the script: Pass the path to your projects and the path to your samples as arguments:
python flp_scanner.py "C:/Path/To/Your/Projects" "D:/Path/To/Your/Samples"
-
Review & Delete:
- The script will first list all unused folders.
- It will then list all unused files and the total reclaimable space.
- You will be prompted:
Do you want to delete the unused files? (Y/n). - Press Enter or Y to proceed. (Note: This deletes files only, it does not remove directory structures).
- Git Aware: Automatically ignores
.gitand.githubfolders to protect your repositories. - Backup Exclusion: Skips
.flpfiles found in "Backup" folders to avoid redundant matching. - Path-Tail Matching: Instead of matching just
bass.wav, it matchesfolder_name/bass.wavto ensure it doesn't delete a sample from one pack just because you used a same-named sample from another. - Dry Run by Default: No files are deleted until you explicitly confirm at the end of the scan.
My sample library reached a point where it was consuming massive amounts of SSD storage. Manual cleanup was impossible due to the sheer volume of nested directories and generic filenames. This tool helped me reclaim hundreds of megabytes (or gigabytes) by identifying the specific stems I never actually imported into a project.
Disclaimer: Always keep a backup of your important samples before running any deletion script. While this tool uses strict path matching, use it at your own risk.