Pio project metadata command missing - possibly because 2 installed versions?

Used Platform IO a couple of years ago briefly. Now come back to it.
When running platformio project metadata --json-output -e uno --json-output-path /tmp/pio.json the terminal complains that the metadata command is not found.

Error: No such command ‘metadata’.

I did my install following the instructions here: Installer Script (Recommended) — PlatformIO latest documentation using the “Super Quick” setup.

I don’t understand python etc so not sure what I need to do to resolve this - I assume it’s some install issue I’m facing?

When I run platformio project (why is this different to pio?) it tells me about 4.3.4 installed with 6.1.3, however when I follow the uninstall instructions from the FAQ, I get some message about not being able to uninstall it (even though I’m running the command with sudo).

Found existing installation: platformio 4.3.4
Not uninstalling platformio at /usr/lib/python3/dist-packages, outside environment /usr
Can't uninstall 'platformio'. No files were found to uninstall.

Would someone please help direct me towards sorting this out?

Ok looks like I fixed it by uninstalling the old version with dpkg.
I can now build my project with CLion.
And there’s no GUI option but looks like I can use the run -t upload command line option, so it’s all good.