Remove generations older than TIMESTAMP where TIMESTAMP is interpreted as in the -d argument of the date tool.
TIMESTAMP
string
"-30 days"
"-7 days"