How To Uninstall MATLAB (Windows/Mac/Linux)

How To Uninstall MATLAB (Windows/Mac/Linux)

Matlab is a widely used programming environment and software package for numerical computing and data analysis. It is favored for its powerful mathematical and data visualization capabilities, making it indispensable in various scientific and engineering fields. However, there are scenarios in which one might want to uninstall Matlab. Some common reasons include the high licensing costs, especially for individual users or small organizations, which can be prohibitive. Additionally, if a user’s computing needs change or they find alternative software better suited to their specific tasks, uninstalling Matlab may free up system resources and reduce clutter, making room for more relevant tools. Let’s look at how to uninstall Matlab from Windows, Mac, and Linux.

Uninstall MATLAB on Windows

To uninstall MATLAB on Windows, you can follow these steps:1

  1. Open the Control Panel and go to the “Programs” or “Programs and Features” option to see a list of installed programs.
  2. Scroll through the list of installed programs and locate MATLAB.
  3. Right-click on MATLAB and select “Uninstall” or “Change” from the context menu.
  4. The MATLAB uninstallation wizard will open. Follow its prompts to uninstall MATLAB.
  5. You may be asked to provide your administrator password or confirmation during the process.
  6. After uninstalling MATLAB, you might want to delete the MATLAB installation folder manually.2 MATLAB is installed by default in a directory similar to “C:\Program Files\MATLAB\R20XXx” (the version number in the directory will vary in your specific installation).3 Deleting this folder can help free up space, but make sure you don’t need any files or data stored there.
  7. MATLAB might have added environment variables to your system. To remove these, right-click “This PC” (or “My Computer”) on your desktop, choose “Properties,” then “Advanced system settings,” and finally, “Environment Variables.” Look for any MATLAB-related variables in both the user and system variables sections and remove them if you are sure they are no longer needed.

After the uninstallation is complete, it’s a good practice to restart your computer to ensure that any remaining components are removed from memory.

Uninstall MATLAB on Mac

To uninstall MATLAB on a Mac, you can follow these steps:4

  1. Make sure you close MATLAB if it’s currently running.
  2. Open Finder and Navigate to your “Applications” folder, usually located in the Dock or the left sidebar of a Finder window.
  3. Find the “MATLAB” application in the “Applications” folder.
  4. Drag the “MATLAB” application to the Trash icon in your Dock or the Trash icon in the Finder sidebar. Alternatively, you can right-click on the MATLAB application and select “Move to Trash.”
  5. The above steps remove the MATLAB application, but MATLAB often leaves behind some configuration files and folders. To completely uninstall it, you need to remove these residual files. You can do this through the Terminal by using the following command: rm -rf ~/Library/Application\ Support/MathWorks && rm -rf ~/Library/Preferences/com.mathworks.*.
  6. After you’ve deleted all the MATLAB files and folders, don’t forget to empty your Trash to permanently delete the application and its associated files.

Uninstall MATLAB on Linux

To uninstall MATLAB on Linux, you can follow these steps:

  1. Open a terminal emulator on your Linux system. You can typically find it in your applications menu or use a keyboard shortcut like Ctrl+Alt+T.
  2. MATLAB is typically installed in a directory of your choice. Go to MATLAB’s installation directory. Common installation directories include /usr/local/MATLAB or /opt/MATLAB/R20XXx, where “R20XXx” is the version number. You can use the cd command to change your current directory to the MATLAB installation directory. For example: cd /usr/local/MATLAB/R20XXx.
  3. MATLAB usually provides an uninstaller script. To run it, use the following command in the terminal: sudo ./uninstall. If you installed MATLAB without root privileges, you might not need to use sudo.
  4. When you run the uninstaller script, a graphical or text-based uninstaller wizard should appear. Follow its instructions to complete the uninstallation process.
  5. After uninstalling MATLAB, you may want to remove any license files associated with it to free up any license seats. These files are typically located in the /var/local/matlab directory. Use the sudo command to remove them: sudo rm -rf /var/local/matlab.
  6. If you’ve created desktop icons or shortcuts for MATLAB, you may need to manually delete them.
  7. You can verify that MATLAB has been uninstalled by trying to run matlab in the terminal. If MATLAB is removed, you’ll see a “command not found” error.


  1. Uninstall MathWorks products – MATLAB & Simulink. (n.d.). ↩︎
  2. How do I uninstall MathWorks Products on Windows when the uninstall. . . (n.d.). ↩︎
  3. Where is MATLAB installed on my machine? (n.d.). MATLAB Answers – MATLAB Central. ↩︎
  4. Karapetyan, A., & Karapetyan, A. (2023c, September 15). Uninstall Matlab on a Mac. Nektony. ↩︎