How to remove git from a specific folder?
Solution 1:
The fact that git is in the folder /usr/local/bin
suggests that it had not been installed via the system package management.
Maybe it has been compiled from source, maybe it was installed differently, there is no way to know.
If it has been compiled and installed from source, AND the source code is still on the system, you might be able to remove it using make uninstall
in the source folder.
If not you will have to delete every file that belongs to that git install manually (or at least the git binary and ignore that you have more orphaned files on your system). Your best chance is to ask whomever installed it.
You could just install git with the package manager. It should supersede the older installation, or you should be able to make it the "primary" by adjusting the order of the bin directories in the path variable.