In this guide, we will walk you through the process of completely uninstalling MATLAB from your Ubuntu system. MATLAB, a high-level language and interactive environment for numerical computation, visualization, and programming, is widely used by engineers and scientists. However, if you no longer need it, you may want to uninstall it to free up system resources.
Uninstalling MATLAB via Ubuntu Software
If you installed MATLAB through the Ubuntu Software, you can uninstall it using the Ubuntu terminal. Here’s how:
- Open your terminal. You can do this by pressing
Ctrl + Alt + T.
- Type the following command and press
sudo apt-get remove matlab-support
This command instructs the system to remove the MATLAB support package. The
sudo command ensures you have administrative privileges,
apt-get is the package handling utility in Ubuntu, and
remove is the operation that uninstalls the package.
Manual Uninstallation of MATLAB
If the above method doesn’t work, you may have installed MATLAB directly from MathWorks. In this case, you will need to manually remove MATLAB. Here are the steps:
Navigate to the MATLAB Directory
Firstly, open a terminal and navigate to the directory where MATLAB is installed. This is typically located at
<version> represents the MATLAB version you installed.
Shutdown the MATLAB License Manager
If the MATLAB license manager is running, you need to shut it down using the following command:
This command ensures that the license manager is not running, which could interfere with the uninstallation process.
Remove License Manager Files
Next, remove any license manager files in the
/var/tmp directory by running:
sudo rm /var/tmp/lm_TMW*
This command removes any temporary files associated with the MATLAB license manager.
Remove the MATLAB Installation Directory
Now, you can remove the MATLAB installation directory using the
rm -rf command:
sudo rm -rf /usr/local/MATLAB/R<version>
This command deletes the MATLAB installation directory and all of its contents.
Remove Symlinks to MATLAB Binaries
Finally, remove any symbolic links (symlinks) to MATLAB binaries on the path by running:
sudo rm /usr/local/bin/matlab /usr/local/bin/mcc /usr/local/bin/mex /usr/local/bin/mbuild
This command removes the symlinks to the MATLAB, MCC, MEX, and MBUILD binaries. If the
deploytool symlink exists, you can remove it using:
sudo rm /usr/local/bin/deploytool
By following the steps outlined in this guide, you should be able to completely uninstall MATLAB from your Ubuntu system. If you encounter any issues, it is possible that there are residual files or configurations left behind. In that case, you may need to manually search for and remove any remaining MATLAB-related files or directories.
Remember to replace
<version> with the actual MATLAB version you installed in all the commands. Always be careful when using commands that modify your system, such as
rm -rf, as they can permanently delete files.
If you need to reinstall MATLAB or another version of it, you can visit the official MathWorks website for the latest installation packages and guides.
Yes, if you installed MATLAB through the Ubuntu Software, you can uninstall it using the Ubuntu terminal. Simply follow the steps mentioned in the guide.
If you installed MATLAB directly from MathWorks, you will need to manually remove it. The guide provides step-by-step instructions on how to navigate to the MATLAB directory and remove all relevant files and directories.
It is always a good idea to back up any important MATLAB files or data before uninstalling the software. This ensures that you can easily restore them if needed in the future.
Yes, uninstalling MATLAB will free up system resources as it removes all the installed files and directories associated with the software.
If you need to reinstall MATLAB after uninstalling it, you can visit the official MathWorks website for the latest installation packages and guides. They provide detailed instructions on how to download and install MATLAB on various operating systems.