troubleshootingsql.com
How to purge MSDB history using T-SQL scripts
One of the Maintenance Plan Tasks available is the History Cleanup Task which can help you keep the MSDB database size in check. This Maintenance Plan Task uses the MSDB Stored Procedures sp_delete…