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, myToolbox and myOtherToolbox, and you want to uninstall the myToolbox toolbox.

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. Since myToolbox is listed first in the table, information about it can be found in toolboxes(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 the matlab.addons.toolbox.installedToolboxes function, and it has the following fields.

FieldDescription
NameName of the toolbox
VersionToolbox version
GuidUnique toolbox identifier

MATLAB uses the Guid field to determine which toolbox to uninstall.

Data Types: struct

Alternatives

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

Version History

Introduced in R2016a