21.1 Locking and Unlocking a Package on a Managed Device

You can lock a package on the managed device to prevent it being deleted, or to prevent it from being upgraded to a newer version.

To lock a package:

  1. List all the packages installed on the managed device by entering the rug pa command. From the list, select the package you want to lock.

  2. Lock the package by entering the rug la package_name [<relation> <version>] command.

    The package_name can include wildcard characters. The following table explains the valid relational operators that can be used with the package in the command:

    Relational Operator

    Functionality

    =

    Locks only the specific package version.

    <

    Locks all versions of the package older than the specified version excluding the specified version.

    >

    Locks all versions of the package later than the specified version excluding the specified version.

    <=

    Locks all versions of the package older than the specified version as well as the specified version.

    >=

    Locks all versions of the package later than the specified version as well as the specified version.

    If you want to install a specific version of the package, ZENworks first checks if the package version has been locked, then installs the package version only if it is not locked. For example, lets assume that all the later versions of the package, “X 1.7” have been locked by using the rug la X >1.7 command. If you try to install X 1.9 package by using the rug in X (1.9)command, the installation fails.

  3. Ensure that the package is locked by entering the rug ll command. This displays all the locked packages.

To unlock a package:

  1. List all the packages that are locked on the managed device by entering the rug ll command. This displays the package name and its lock index.

  2. Select the package you want to unlock.

  3. Unlock the package by entering the rug ld lock_index command.

  4. Ensure that the package is unlocked by entering the rug ll command. This displays only the locked packages.