Continuous integration and Nightly build

I'm looking for suggestion about managing my artifact for WyUpdate in my Nightly Build job and ultimately my build for production...

I can do it manually for Production... after maybe a year, I know all my user are at a minimum version. So I can Open my .wyp project and remove all previous version I want.

How do you automate that stuff for a Nightly Build ? Let's say I wan't to keep only all the version of the 7 last day.

Currently my version number is that format: 4.0.22.20901. 20901 is my build from TFS2015. 209 is the day of the year, 01 is the build of the day

I'm not sure if RemoveVersion in the xml file can help me !!!Thanks for you suggestion.

Yep, the "RemoveVersion" element is exactly what you're looking for: https://wyday.com/wybuild/help/commandline.php#remove-version