macOS is bundled with xcode-select . By using this command, you can download and install the latest Xcode command-line tools. What you need is to enter the following command.
A standard License Agreement will appear. If you want to, you can read them all. Click Agree to continue the installation process.
tools license agreement" />
A pop-up window will appear informing you of the download progress. This time you do nothing. Wait until the download process finished. This can take a long time, it depends on your internet speed.
After the downloading finished, the final pop up window will appear. This is to inform you that the Xcode command-line tools were installed on your machine successfully.
In the case in the future you don’t need it again and want to free some space, you can uninstall it.
Unfortunately, there is no xcode-select --uninstall command. So, you have to do it manually. Just type the following command to the terminal.
I am not Groot.