MATLAB installs all support packages to a specific root folder in a default location:
What is the default directory support packages are installed to?
You can change this default location to a custom directory using setSupportPackageRoot. Follow the steps below to set the support package root for your MATLAB installation to a custom location and verify the change: 1. Restart MATLAB.
2. Enter the following command in the MATLAB Command Window:
>> matlabshared.supportpkg.setSupportPackageRoot('C:\MATLAB\CustomSupportPackageRoot');
3. Restart MATLAB and verify the change:
>> matlabshared.supportpkg.getSupportPackageRoot()
ans =
'C:\MATLAB\CustomSupportPackageRoot'
Important Notes:
(1) You must have administration privileges for the custom folder you specify.
(2) You must also have administrator privileges when running 'setSupportPackageRoot' because the command calls savepath.
(3) Changing the root folder removes previously installed support packages from the MATLAB path, but the files remain on disk. This means that existing support packages must be reinstalled into the new location. Any support packages already present in the new location become available on the MATLAB path.