Custom backup deletion Ola Scripts
You can use the CleanupTime  parameter for each backup job (log, diff, full)


  Specify the time, in hours, after which the backup files are deleted. If no time is specified, then no backup files are deleted.


So for example: 

@Cleanuptime = 336  --2 weeks for transaction logs 
@Cleanuptime = 744  --1 month for diff backups 
@Cleanuptime = 8760 --1 year for full backups


Example A from Ola


  A. Back up all user databases, using checksums and compression; verify
  the backup; and delete old backup files


EXECUTE dbo.DatabaseBackup
@Databases = 'USER_DATABASES',
@Directory = 'C:\Backup',
@BackupType = 'FULL',
@Verify = 'Y',
@Compress = 'Y',
@CheckSum = 'Y',
@CleanupTime = 24