Uninstall MathWorks Products
Your license to use MathWorks® products provides a set number of installations you can perform (for particulars, check your license agreement). Each of these installations is called an activation.
When you uninstall, you remove the software for a specific release from that computer, but that installation is still considered activated and counts toward your total.
You may have installations you want to remove but not deactivate, and you may have installations you want to deactivate but not remove. Consult the following table to determine which of these removal processes work best for your scenario.
|Uninstall (but not deactivate)||
|Deactivate (but not uninstall)|
You have used all your activations, and you now want to install on another machine.
For this scenario, you would deactivate the license on a machine you no longer need, so that you can then activate the license on a new machine.
If you do not plan to run MATLAB® again on the deactivated machine, you should uninstall the software also.
|Uninstall and deactivate|
Decommissioning or destroying a machine.
For this scenario, if the computer is still working, you can uninstall the software and deactivate the license on the computer using that same computer. If the computer is unusable or lost, there is still a procedure you can follow to deactivate the license, but you won't have to uninstall the software.
If you uninstall the software before you deactivate the license, use one of the non-MATLAB options for starting deactivation.
To uninstall, follow the procedures in this section. To deactivate, see Deactivate Your Installation.
Uninstall Products Interactively
Uninstall Products from Windows Systems
To uninstall MathWorks products from your computer:
Start the uninstaller, using any of the following methods.
On computers running Windows® 10, go to MATLAB R2022b and open the folder. Right-click MATLAB inside the folder, and select Uninstall.
On computers running Windows 7, click the Start menu, and select Control Panel. In the Control Panel, select Uninstall a Program in the Programs category. From the list of products displayed, click MATLAB R2022b.
Assuming you selected the default folder when you installed MATLAB, navigate to
C:\Program Files\MATLAB\R2022b\uninstall\bin\win64. If you installed in a different folder, navigate there instead. Double-click the uninstaller executable,
To use the uninstaller properties file (uninstaller_input.txt) to run the uninstaller noninteractively, see Uninstall Products Noninteractively.
In the Uninstall Products dialog box, select the products you want to remove and click Uninstall.
If you select MATLAB, you automatically remove all other MathWorks products.
You might receive a message telling you that the product you want to uninstall has other products that depend on it. For example, most MathWorks products require the MATLAB product. To close the message and continue removing products, click OK. To change the products you had selected for deletion, click Cancel.
If you also want to remove your MATLAB user preferences, click the Uninstall MATLAB preference files (including Command History) check box. By default, the uninstaller does not delete these preference files. MATLAB preference files contain your environment settings, such as command history and Help favorites. To find where MATLAB stores your preferences, use the
prefdircommand at the MATLAB prompt, as in the following example:
prefdir ans =C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2022b
is the user name (login name) of the person who runs MATLAB on this computer.
(Optional) Choose whether to delete download archive files. If your MATLAB installation folder contains the archive files for downloaded products, the uninstaller displays a message asking if you want to delete these archive files. The installer stores these archive files in the
folder of your installation. To remove these files, click Yes.
To proceed with the removal, click the Uninstall button. The uninstaller displays the status of the operation as it progresses and displays a dialog box when the operation is complete. Click Finish to exit the uninstaller. When you uninstall a MATLAB installation, the uninstaller displays a dialog box suggesting that you deactivate the installation. For more information about deactivation, see Deactivate Your Installation.
Uninstall Products from Linux Systems
Exit the MATLAB program.
Enter this command at the Linux prompt, where
represents the name of your top-level MATLAB installation folder:
rm -rf matlabroot
Uninstall Products from macOS Systems
To uninstall MATLAB:
Get the user name and password of an administrator account on the macOS computer. Depending on where you installed MATLAB software, you might need administrator privileges to remove it.
Navigate to your MATLAB installation folder. For example, the installation folder might be named
Drag your MATLAB installation folder to the trash, and then select Empty Trash from the Finder menu.
If you need to deactivate the software, see Deactivate Your Installation.
Uninstall Products Noninteractively
To run the uninstaller noninteractively:
Create an uninstaller properties file.
Make a copy of the uninstaller properties file template, named
uninstaller_input.txt, located in the
uninstallfolder in your MATLAB installation folder. For example, on a Windows computer, you might execute this command:
copy matlabroot\uninstall\uninstaller_input.txt C:\temp\my_uninstall.txt
Open your uninstaller properties file using any text editor, and enter values for all the specified parameters. For example, you can specify the name of the output log file using the
outputFile=parameter. The template contains detailed descriptions of each parameter with examples.
By default, the uninstaller removes all the products in a particular MATLAB installation, however, you can specify which products to delete. In the product list in the template, remove the comment character at the beginning of the product name. In silent mode, if you specify a product for deletion that is not one of your installed products, the uninstaller exits and writes a message to your log file. If you specified
mode=automated, the uninstaller displays the Product Selection dialog box and pauses, waiting for you to adjust the product selection.
Save your changes to the file.
Run the uninstaller (
uninstall.exe), using the
-inputFileflag to specify the properties file as a command-line argument.
For example, click Start and select the Run option. In the Run dialog box, enter the
uninstallcommand, specifying the full path of the properties file as a command-line argument:
uninstall.exe -inputFile C:\temp\my_uninstall.txt