This is the default Jenkins feature, and you do not need a plugin to achieve what you need. Go to the job configuration page and check the box "Cancel old builds" (this is correct in the job description. Then select the log rotation as a strategy and specify "7" as the value "Days to save the assembly".
source share