Main Content

matlab.addons.toolbox.uninstallToolbox

Uninstall toolbox

Description

example

matlab.addons.toolbox.uninstallToolbox(installedToolbox)uninstalls the specified toolbox. MATLAB®removes all the files and folders associated with the toolbox from the path and then deletes them.

Examples

collapse all

Assume that you previously installed two toolboxes,myToolboxandmyOtherToolbox, and you want to uninstall themyToolboxtoolbox.

Obtain the structure array of installed toolboxes, and display it as a table.

toolboxes = matlab.addons.toolbox.installedToolboxes; struct2table(toolboxes)
ans = Name Version Guid ________________ _______ ______________________________________ 'myToolbox' '1.5.2' 'd0169b4a-fe74-463f-981a-26160c94cbe5' 'myOtherToolbox' '1.0' '1deb72c1-725f-4e1b-a1a7-dcc8e75453bb'

Read the table and note the location of the toolbox you want to uninstall. SincemyToolboxis listed first in the table, information about it can be found intoolboxes(1).

installedToolbox = toolboxes(1)
installedToolbox = Name: 'myToolbox' Version: '1.5.2' Guid: 'd0169b4a-fe74-463f-981a-26160c94cbe5'

Uninstall the toolbox. If the uninstall process is successful, MATLAB does not display output.

matlab.addons.toolbox.uninstallToolbox(installedToolbox)

Input Arguments

collapse all

Information about the toolbox to uninstall, specified as a structure. The structure is an element of the structure array returned by thematlab.addons.toolbox.installedToolboxesfunction, and it has the following fields.

Field Description
Name Name of the toolbox
Version Toolbox version
Guid Unique toolbox identifier

MATLAB uses theGuidfield to determine which toolbox to uninstall.

Data Types:结构体

Alternatives

You can uninstall toolboxes from the Add-On Manager UI. For more information, seeGet and Manage Add-Ons.

Introduced in R2016a