Your organization may have a requirement that only X days of IM chat conversations are to be retained in your archive. Fortunately, both OCS and Lync provide this functionality out-of-the-box.
- Open the Office Communications Server Control Panel
- Expand the Archiving Servers section in the left panel and select your archiving server.
- Right-click and select Properties.
- Check the checkbox "Archiving Days Logged" and enter the number of days you want retained.
- Select OK to commit the changes.