Portupgrade: sed: 1: "s|^\(@comment[": unbalanced brackets ([])

To fix this error, make sure you are running the latest version of Portupgrade, I'm using 2.2.6. Then run the following command:

host# pkgdb -L