Housekeeping on hangfire database

It is possible to delete everything from the Hangfire database, and start “clean” again. However, this will delete everything including all your history of jobs plus any scheduled or recurring jobs.

You can clean up the database with the SQL statements in the comment by gussdavey (Apr 2017) in this post:

Database Cleanup (SQL Server)

You should stop all of your Hangfire processes (services, etc.) first and wait for any currently active jobs to complete, before using the SQL statements in the above post. Then, you will need to run any code to re-schedule any jobs and recurring jobs. If you have any code in other applications that schedules “ad-hoc” jobs (such as for sending emails after some user event in an application) then you may need to be able to re-run that code again (or make sure that all those ad-hoc jobs have completed before cleaning up the database).