keepcalculator

06 Numbers and Powers

Uninstall MATLAB Mac: Full Removal Guide

Card No. 06·74686 · Updated · Standard formula, shown below

To uninstall MATLAB on a Mac, you need to delete the application folder and its support files in your home library. This guide walks you through the complete removal process, including hidden preference files, and explains what to do if you run into problems.

What Uninstalling MATLAB on Mac Involves

MATLAB does not come with a dedicated uninstaller on macOS. The MathWorks installation places files in several locations, and simply dragging the MATLAB folder to the Trash leaves behind preferences, license files, and cached data. A full uninstall removes all of these components so no trace remains.

The main components to remove are:

  • The MATLAB application folder (usually in /Applications)
  • License files and preferences in ~/Library/Application Support/MathWorks
  • Cached data in ~/Library/Caches/MathWorks
  • Saved preferences in ~/Library/Preferences/com.mathworks.* files
  • Logs and crash reports in ~/Library/Logs/MathWorks

Before You Begin: Back Up Your Work

Uninstalling MATLAB deletes all files in the application folder, including any scripts, models, or data you saved there. Before proceeding, back up anything you want to keep:

  • Copy your .m scripts, .mlx live scripts, .mat data files, and Simulink models to an external drive or cloud storage.
  • Export any Simulink models or App Designer apps you built.
  • Note your license number and account details if you plan to reinstall later.

If you have a network license, you do not need to deactivate it before uninstalling. For a standalone license, you can deactivate it from your MathWorks account if you are moving to another computer.

Step-by-Step Uninstall Process

Follow these steps in order to remove MATLAB completely from your Mac.

  1. Quit MATLAB and any related processes (Simulink, MATLAB Compiler Runtime, etc.). Use Activity Monitor to check for background processes named MATLAB.
  2. Delete the MATLAB application folder. Open Finder, go to /Applications, find the folder named MATLAB (e.g., MATLAB_R2023b.app), and drag it to the Trash. If you installed multiple versions, delete each one.
  3. Remove the MathWorks support folder. In Finder, press Shift+Cmd+G and enter ~/Library/Application Support. Look for the MathWorks folder and delete it. This contains license files, preferences, and toolbox settings.
  4. Clear caches. Go to ~/Library/Caches and delete the MathWorks folder.
  5. Delete preferences. Go to ~/Library/Preferences and remove any files starting with com.mathworks (e.g., com.mathworks.matlab.plist).
  6. Remove logs. Go to ~/Library/Logs and delete the MathWorks folder.
  7. Empty the Trash. Right-click the Trash icon and choose Empty Trash. This permanently deletes the files.

If you used a shared or system-level installation (for example, installed with administrator privileges), you may also need to check /Library/Application Support and /Library/Caches for a MathWorks folder. These are less common but can exist on multi-user systems.

How to Remove MATLAB Using Terminal (Advanced)

If you prefer using the command line, you can remove all MATLAB files with a few commands. This is faster but requires care because deleting the wrong path can damage your system.

  1. Open Terminal (Finder > Applications > Utilities > Terminal).
  2. Run the following command to delete the main application folder (replace R2023b with your version):
    sudo rm -rf /Applications/MATLAB_R2023b.app
    You will be prompted for your administrator password.
  3. Delete the support files in your home directory:
    rm -rf ~/Library/Application\ Support/MathWorks ~/Library/Caches/MathWorks ~/Library/Logs/MathWorks ~/Library/Preferences/com.mathworks.*
  4. If you installed system-wide, also run:
    sudo rm -rf /Library/Application\ Support/MathWorks /Library/Caches/MathWorks

Double-check each path before pressing Enter. The rm -rf command permanently deletes files and cannot be undone.

Common Problems and How to Fix Them

Users often encounter a few issues during uninstallation:

  • “MATLAB is still running” error: Even after quitting the app, a background process may linger. Open Activity Monitor, search for “matlab”, select the process, and click the X button to force quit.
  • Permission denied when deleting files: This happens when files are owned by another user or the system. Use sudo in Terminal or change the file permissions in Finder’s Get Info window.
  • Files reappear after deletion: Some MATLAB components, like the Java runtime, may be installed in other locations. Search your system for any folder named “MathWorks” using Spotlight (Cmd+Space) and delete all results.
  • Can’t find the application folder: If you installed MATLAB via a custom location, use Spotlight to locate the .app file. The default is /Applications, but you may have chosen another folder during installation.

If you are uninstalling because of a corrupted installation, consider reinstalling the latest version from MathWorks after removal. A fresh install often resolves persistent errors.

What Happens to Your License After Uninstall?

Uninstalling MATLAB does not cancel your license. Your MathWorks account remains active, and you can reinstall the software later. For a standalone (individual) license, you can deactivate it from your account page to free up a seat if you are moving to another machine. For a network or campus license, no action is needed.

If you are uninstalling because you no longer need MATLAB, you can also consider canceling any paid maintenance or subscription. That is done through your MathWorks account, not by deleting files.

Alternatives to Full Uninstall

If you are short on disk space or facing performance issues, you might not need to uninstall entirely:

  • Remove individual toolboxes: In MATLAB, go to the Home tab > Add-Ons > Manage Add-Ons to uninstall specific toolboxes without removing the core program.
  • Clear MATLAB preferences: Sometimes resetting preferences fixes glitches. Delete only the ~/Library/Preferences/com.mathworks.matlab.plist file and restart MATLAB.
  • Move MATLAB to an external drive: If disk space is the issue, you can move the application folder to an external drive and run it from there, though performance may be slower.
  • Use MATLAB Online: If you have a valid license, you can access MATLAB through a web browser without installing anything locally.

Frequently Asked Questions

Do I need to uninstall MATLAB before reinstalling a newer version?

No, you can install a newer version alongside an older one. They will coexist as separate folders in /Applications. However, if you want to free up space or avoid confusion, uninstalling the old version first is fine.

Will uninstalling MATLAB delete my .m files?

Only if your .m files are stored inside the MATLAB application folder. Files you created in your own directories (like Documents or Desktop) are not touched. Always back up any scripts you have in the application folder.

How do I remove MATLAB from a Mac if I don’t have admin rights?

You can delete the application folder and your user-level support files without admin rights, but you may not be able to remove system-wide files. Contact your IT administrator for a complete removal on a managed computer.

Is there an official uninstaller for MATLAB on Mac?

No, MathWorks does not provide a dedicated uninstaller for macOS. The manual process described above is the standard method.

Can I recover files after emptying the Trash?

Once you empty the Trash, the files are gone. If you have Time Machine or another backup, you can restore them from there. Otherwise, recovery is unlikely without specialized software.

Why is MATLAB taking up so much space even after uninstall?

You may have missed some support files. Use a disk space analyzer app or manually check the Library folders mentioned above. Also, check ~/Library/Application Support for other MathWorks-related folders like “MathWorks Installer” or “MATLAB Add-Ons”.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →