Snapshot Replication Retention
This is usually an issue where the permissions on xp_cmdshell have been modified for security reasons. You can also have this issue if the SQL Agent account does not have the required network permissions to delete data from your replication folder.


Verify xp_cmdshell is enabled and that the account executing it has proper permissions.

USE master
GO
EXEC sp_configure 'show advanced option', '1';
reconfigure;
GO
exec sp_configure 'xp_cmdshell';



Output should be:

name         minimum    maximum config_value run_value
xp_cmdshell  0          1       1            1