That does sound simple, but is not the process the macports docs suggest.
You can do the same thing with brew, `/opt/local/brew`
Did you mean /opt/homebrew? For Intel Macs it's /usr/local. You can't just delete it. You give up binary packages if you install it anywhere else.
Ah, yes I did mean `/opt/homebrew` - and yes I know on Intel Macs it works differently, but it can be installed at custom locations for people who still have them.
I stated the problem with custom locations already.