I would be careful in doing something like that. You may have cases where you want to retry a failing installation or have preloaded the cache. And you’ll force the agent to download the payloads again.
If the size of the cache is what you care about, did you consider setting it to a lower limit ? The Agent will automatically clear older entries in the cache to make space for more recent ones when needed automatically.