Main Content

mpmlist

List installed packages

Since R2024b

    Description

    mpmlist displays a list of all installed packages.

    example

    mpmlist(keyword) displays installed packages whose Name, DisplayName, FormerNames, Summary, or Description property contains the specified keyword. mpmlist performs a case-insensitive search for the keyword.

    example

    mpmlist(___,Name=Value) specifies options using one or more name-value arguments in addition to any of the input argument combinations in previous syntaxes. For example, you can specify a package name, identifier, or range of versions to determine the list.

    example

    pkg = mpmlist(___) returns an array of matlab.mpm.Package objects where each element is an installed package that meets the specified criteria.

    example

    Examples

    collapse all

    Display a list of all installed packages.

    mpmlist
             Name         Version    Editable    InstalledAsDependency
        ______________    _______    ________    _____________________
    
        "Astronomy"       "1.3.1"     false              false        
        "RandomNumGen"    "2.0.0"     false              false        
        "Physics"         "1.0.1"     false              false        
    

    Display a list of all installed packages with the specified keyword.

    mpmlist("gravity")
             Name         Version    Editable    InstalledAsDependency
        ______________    _______    ________    _____________________
    
        "Astronomy"       "1.3.1"     false              false        
        "Physics"         "1.0.1"     false              false        
    

    Display a list of all installed packages with the specified version range.

    mpmlist(VersionRange=">=2.0.0")
             Name         Version    Editable    InstalledAsDependency
        ______________    _______    ________    _____________________
    
        "RandomNumGen"    "2.0.0"     false              false        
    

    Create a matlab.mpm.Package array for all installed packages.

    pkg = mpmlist
    pkg = 
    
      1×3 Package array with properties:
    
        Name
        DisplayName
        FormerNames
        Version
        ID
        Dependencies
        Provider
        Folders
        Summary
        Description
        ReleaseCompatibility
        Installed
        Editable
        InstalledAsDependency
        PackageRoot
        Repository
        InstalledDependencies
        MissingDependencies
    
      Display as table
    

    Input Arguments

    collapse all

    Search keyword, specified as a string scalar or character vector. The function performs a case-insensitive search for keyword as a substring in the Name, DisplayName, FormerNames, Summary, and Description properties of installed packages.

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: mpmlist(CompatibleWithRelease="R2024b")

    Package name, specified as a string scalar, character vector, or pattern. This option limits the output to only packages whose Name or FormerNames property matches the specified pattern.

    Example: Name="MyPackage"

    Example: Name="Package"+lettersPattern

    Package display name, specified as a string scalar, character vector, or pattern. This option limits the output to only packages whose DisplayName property matches the specified pattern.

    Example: DisplayName="MyPackage"

    Example: DisplayName="Package"+lettersPattern

    Version range, specified as a string scalar, character vector, or matlab.mpm.Version object. This option limits the output to only packages whose Version property is within the specified version range.

    Version syntax follows the Semantic Versioning 2.0.0 format: <major version>.<minor version>.<patch version>, where each version number must be a nonnegative integer, for example 1.2.3. You can optionally specify a pre-release version by adding -<pre-release version> to the end of the version, for example 1.2.3-alpha. Optionally specify a build version by adding +<build version>.

    Specify a range of versions by including the <, <=, >, or >= operators in front of a version number. For example, >2.1.13 specifies all versions greater than 2.1.13. Specify more than one range separated by white space to further limit matches. For example, >2.1.13 <=2.1.15 includes versions 2.1.14 and 2.1.15, but not 2.1.13 or 2.1.16. Use the || operator to designate multiple acceptable version ranges. For example, <2.1.13 || >2.1.15 includes versions less than 2.1.13 and greater than 2.1.15, but not 2.1.14.

    Example: VersionRange="1.2.3"

    Example: VersionRange="1.2.3-alpha"

    Example: VersionRange="1.2.3-alpha+exp"

    Example: VersionRange=">2.1.13"

    Example: VersionRange=">2.1.13 <=2.1.15"

    Example: VersionRange="<2.1.13 || >2.1.15"

    Package identifier, specified as a string scalar or character vector containing a universally unique identifier (UUID). This option limits the output to only packages whose ID property matches the specified identifier.

    Example: ID="9ecfea6b-1710-4fb9-aa66-e4750f0e8251"

    Package specifier, specified as a string scalar, character vector, or a matlab.mpm.PackageSpecifier object. If PackageSpecifier is a string scalar or character vector, then it must contain a package specifier in the format "Name", "Name@VersionRange", or "Name@VersionRange@ID". This option limits the output to only packages whose package specifier fits the specified value.

    Example: PackageSpecifier="MyPackage"

    Example: PackageSpecifier="MyPackage@1.0.1"

    Example: PackageSpecifier="MyPackage@1.0.1@9ecfea6b-1710-4fb9-aa66-e4750f0e8251"

    Package provider, specified as a string scalar, character vector, or pattern. This option limits the output to only packages whose Provider property matches the specified pattern.

    Example: Provider="MathWorks"

    MATLAB release compatibility, specified as a string scalar, character vector, or a matlabRelease object. This option limits the output to only packages that are compatible with the specified release based on their ReleaseCompatibility property.

    If you specify a string scalar or character vector, use the full name of a MATLAB release version, for example "R2024b", or the semantic version in the format <major version>.<minor version>.<patch version>. When you specify a MATLAB version using semantic version syntax, the major version is equal to the last two digits of the release year. The minor version is 1 for a releases and 2 for b releases. The patch version is always 0. For example, R2024b has a semantic version of "24.2.0".

    If you do not specify CompatibleWithRelease, then the function uses the current MATLAB version.

    Example: CompatibleWithRelease="R2024b"

    Example: CompatibleWithRelease="24.2.0"

    Package root folder, specified as a string scalar or character vector containing a relative or absolute pathname. This option limits the output to the package in the specified folder.

    Example: Location="MyFolder/MyPackage"

    Version History

    Introduced in R2024b