Personally, I'd strongly advocate against practices like this. Eventually, this is just asking for trouble.
When package options and dependencies change, it can happen that conflicts occur which are resolved by removing some existing packages. Using auto-accept ( -y
) will essentially prevent you from reviewing those changes to ensure that everything is working as per your expectation.
Furthermore, you're essentially gonna miss out on the package info which might instruct you to perform some action(s) manually. These too can change on port version or revision updates or conflicts that need to be resolved somehow.
There are plenty of other scenarios where stuff won't just run smoothly this way. Others are probably able to provide better information & scenarios on this than I am.
It also happened more than once that I was glad that I still had packages in the cache so I tend not to clear that except during situations where I know that it's all good.
I used to do something very similar on VMs which are part of CI/CD pipelines where one might argue that this is the decent thing to do. However, over the years I learned not to do that anymore to avoid problems such as the ones outlined above. Instead, I update the master VM image manually and then have my CI/CD build agent VMs clone off of that.
At the very least, I'd recommend using a boot environment so you can at least roll back easily if you have to.