sp_purge_jobhistory
Removes the history records for a job. Example Purge job history records older than 30 days. Sources: https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-purge-jobhistory-transact-sql?view=sql-server-2017