Distribution clean up job in transactional replication removed records but not files Distribution clean up job ran without errors according to schedule, but I noticed that the snapshot files were not removed even if when created beyond max_disretention period. Records from msrepl_commands and msrepl_transactions were removed, but the files were not. 


immediate_sync = 1 
max_disretention = 72 hours
the "immediate sync" option is the problem here. Unless you are regularly adding new subscribers every few hours, then this can be set to false and the snapshots are then cleared out after being applied.

exec sp_changepublication
          @publication=N'&lt;publication_name&gt;',
          @property=N'allow_anonymous',
          @value='false';
go

exec sp_changepublication
          @publication=N'&lt;publication_name&gt;',
          @property=N'immediate_sync',
          @value='false';
go


There is a lot of really good information about this here: http://www.replicationanswers.com/TransactionalOptimisation.asp