Can't uninstall some MacPort packages: "Error: port deactivate failed: this entry does not own the given file"

Solution 1:

If things go really wrong, don't forget that you can always ​uninstall MacPorts entirely before manually reinstalling ports.

from the migration guidelines.

Also

If the port command is not functioning, you can proceed on to the next steps, but if you had installed any ports that install files to nonstandard locations, those files might not be removed.

from https://guide.macports.org/chunked/installing.macports.uninstalling.html

Usually, when my macports installation starts going nutty (usually because I goofed it up), I delete the /opt folder and reinstall. I'm just lazy, i guess. From what it looks like though, you are trying to reinstall a new port over an old/existing folder.

https://stackoverflow.com/a/335313/10063119

So I suggest you perform uninstall.