As always, it is not advisable o shrink a database unless it is an extreme circumstance, like you are running out of disk space, but it can be done. However, for the shrink to work you need to create some space. Listed below are some purge scripts for MSDB. We had a similar situation here (we also perform log shipping) and I used these scripts to free up some space. After that I created a job to purge all history over 30 days. The job runs everyday and I have not had any growth since that time.
--Warning: It is advisable to re-index the history tables before and after executing these stored procedures,
--otherwise, these store procedure could take a long time to purge the history tables.
--The MSDB..SP_DELETE_BACKUPHISTORY proc has terrible performance unless you add the following
--indexes to speed up the search process. Cuts runtime down dramatically.
create index BACKUPSET_I01 ON BACKUPSET (MEDIA_SET_ID)
create index BACKUPSET_I02 ON BACKUPSET (BACKUP_SET_ID,MEDIA_SET_ID)
declare @deleteday datetime
SET @deleteday= dateadd(dd,-30,getdate())
EXEC msdb.dbo.sp_delete_backuphistory @deleteday
EXEC sp_delete_backuphistory @oldest_date = '01/14/2013';
--remove history for a specific job
USE msdb ;
@job_name = N'NightlyBackups' ;
--remove history for all jobs
USE msdb ;
EXEC dbo.sp_purge_jobhistory ;
--deleting all events
EXECUTE msdb.dbo.sysmail_delete_log_sp ;
--delete oldest event
@logged_before = 'October 9, 2005' ;
--delete all events of a certain type
@event_type = 'success' ;
--deleting all emails
DECLARE @GETDATE datetimeSET @GETDATE = GETDATE() EXECUTE msdb.dbo.sysmail_delete_mailitems_sp @sent_before = @GETDATE;GO
--deleting oldest emails
@sent_before = 'October 9, 2012' ;
--deleting all emails of a certain type
@sent_status = 'failed' ;
If you need it, I can also post the script for the nightly purge job as well.