Apache NiFi does not provide a direct option in its Web UI to delete or clear the Provenance Repository. The Provenance Repository stores detailed records of all data flow events (e.g., FlowFiles, attributes, content), and clearing it is typically done for maintenance or troubleshooting purposes.
However, there are ways to manage or clear the provenance data:
✅ Options to Clear/Delete Provenance Repository
1. Stop NiFi and Delete Provenance Files Manually
This is the most common method to fully clear the repository.
After restarting NiFi, older records than the specified time will be purged during normal operation.
You can also adjust:
properties
nifi.provenance.repository.max.storage.size=1 GB
These settings help manage provenance size automatically but do not offer an immediate delete.
3. Using NiFi Registry and Version Control (Indirect Method)
If your focus is on cleaning up old versions of flows, consider using NiFi Registry to version control your flows, and prune old versions there. However, this does not affect the Provenance Repository directly.
❌ What You Can't Do via the Web UI
As of current versions (up to NiFi 1.20+), the Web UI does not include a button or menu option to:
Delete the entire Provenance Repository
Force purge all provenance events immediately
✅ Best Practice
If you need to frequently reset provenance data (e.g., in development/testing environments), create a small script that stops NiFi, clears the provenance directory, and restarts NiFi.
Let me know if you'd like a sample script or guidance on configuring retention policies!