This article describes how to remove the files created during a full installation of the Gurobi Optimizer on macOS. The approach will require running commands in a terminal (MacOS shell), such as the one provided by the Terminal app. Installations of gurobipy through pip or conda can be removed from a Python environment using the pip uninstall or conda remove commands.
Remove installation directories
The Gurobi Optimizer installer places most files in the installation directory. The default installation directory is /Library/gurobi<VERSION>. You can check which versions of Gurobi are installed on a machine by running the following command:
ls -l /Library/gurobi*An installation directory can be removed by running the command:
sudo rm -rf /Library/gurobi1302 # replace 1302 with the Gurobi version to removeIf you have additionally installed Gurobi Remote Services, its installation directory can be removed as follows:
sudo rm -rf /Library/gurobi_server1302 # replace 1302 with the Gurobi version to removeRemove additional artifacts (optional)
The installation directories contain most files, but some additional files and links are created during the installation and can also be removed.
Important: If multiple versions of Gurobi are installed, many of the links described below are associated with your most recently installed version and removing them is not advised. Only remove links and libraries that reference a specific version you are uninstalling.
You can check which Gurobi symbolic links are present by running the command below.
ls -l /usr/local/bin/gurobi* /usr/local/bin/grb*
To remove all of the links appearing in the above output, you can run the command below (The -i flag will prompt for confirmation before each file is removed).
sudo rm -i /usr/local/bin/gurobi* /usr/local/bin/grb*
Additional libraries and links that may be present and can also be removed are listed below.
/usr/local/lib/libgurobi*.dylib
/Library/Java/Extensions/libGurobiJni*.jnilib
/Library/Java/Extensions/gurobi.jarFinally, Gurobi license files (typically named gurobi.lic) are not automatically removed and may remain on the system. You may delete them manually if desired. Their recommended locations are listed here: Where do I place the Gurobi license file (gurobi.lic)?