I want to update my Python framework on Mac and delete the old versions but I am not sure if is safe to
rm -fr /Library/Frameworks/Python.framework/Versions
No, it's not safe. Generally, don't mess with the Python that comes with your OS, many system tools depends on having a specific version of Python.