Main Content

matlab.addons.uninstall

Uninstall add-on

Description

example

matlab.addons.uninstall(name) uninstalls the add-on with the specified name. matlab.addons.uninstall only supports uninstalling toolboxes.

If multiple versions of an add-on are installed, you must either specify a version or 'All' to uninstall all versions.

matlab.addons.uninstall(identifier) uninstalls the add-on with the specified identifier.

example

matlab.addons.uninstall(___,version) also specifies the version of the add-on to uninstall. Use this syntax with any of the arguments in previous syntaxes.

example

matlab.addons.uninstall(___,'All') uninstalls all installed versions of the specified add-on, if multiple versions are installed.

Examples

collapse all

Suppose that you have a toolbox called Random File Name Creator installed on your system. Get the list of installed add-ons and uninstall the Random File Name Creator toolbox.

Get the list of installed add-ons.

addons = matlab.addons.installedAddons
 addons =

  1×4 table

             Name                   Version     Enabled                  Identifier              
    ___________________________    _________    _______    ______________________________________

    "Random File Name Creator"     "1.0"         true      "75442144-f751-4011-bf0e-32b6fb2f1433"

Uninstall the Random File Name Creator toolbox.

matlab.addons.uninstall('Random File Name Creator');

Suppose that you have version 2.0 and version 4.0 of a toolbox called My Toolbox installed on your system. After working with version 4.0, you decide that you no longer need version 2.0 and want to uninstall it.

Get the list of installed add-ons.

addons = matlab.addons.installedAddons
addons =

  2×4 table

             Name                   Version     Enabled                  Identifier              
    ___________________________    _________    _______    ______________________________________

    "My Toolbox_v4.0"              "4.0"         false     "6de8682e-9c3c-407e-bad7-aa103d738d08"
    "My Toolbox"                   "2.0"         true      "6de8682e-9c3c-407e-bad7-aa103d738d08"

Uninstall My Toolbox version 2.0 and confirm that it is uninstalled.

matlab.addons.uninstall('My Toolbox','2.0');
addons = matlab.addons.installedAddons
addons =

  1×4 table

             Name                   Version     Enabled                  Identifier              
    ___________________________    _________    _______    ______________________________________

    "My Toolbox_v4.0"              "4.0"         false     "6de8682e-9c3c-407e-bad7-aa103d738d08"

Enable My Toolbox version 4.0 by specifying the first item in the returned list of identifiers. Then, confirm that it is enabled.

matlab.addons.enableAddon('My Toolbox_v4.0','4.0')
matlab.addons.isAddonEnabled('My Toolbox_v4.0','4.0')
ans =

  logical

   1

Suppose that you have version 2.0 and version 4.0 of a toolbox called My Toolbox installed on your system. You decide that you no longer need My Toolbox and want to uninstall all versions of the toolbox.

Get the list of installed add-ons.

addons = matlab.addons.installedAddons
addons =

  2×4 table

             Name                   Version     Enabled                  Identifier              
    ___________________________    _________    _______    ______________________________________

    "My Toolbox_v4.0"              "4.0"         true      "6de8682e-9c3c-407e-bad7-aa103d738d08"
    "My Toolbox"                   "2.0"         false     "6de8682e-9c3c-407e-bad7-aa103d738d08"

Uninstall all versions of My Toolbox.

matlab.addons.uninstall(addons.Identifier(1),'All')

Input Arguments

collapse all

Name of the add-on that you want to uninstall, specified as a character vector or string. To determine the name of an add-on, use the matlab.addons.installedAddons function.

Unique identifier of the add-on that you want to uninstall, specified as a character vector or string. To determine the unique identifier of an add-on, use the matlab.addons.installedAddons function.

Version of the add-on that you want to uninstall, specified as a character vector or string. To determine the version of an add-on, use the matlab.addons.installedAddons function.

Introduced in R2018b