20.14 Using a Remote Execute Policy to Remove Bundles and Packages from Devices

If you remove a bundle's assignments, the previously assigned devices are no longer assigned to the bundle; however, the software in the bundle remains on those devices. Likewise, if you delete a bundle by clicking the Bundles tab, selecting the box next to a bundle's name, then clicking Delete, the software is not removed from assigned devices.

To remove the bundles and software packages from devices, you can use the Uninstall Bundle Wizard, as explained in Section 20.10, Uninstalling Bundles from Devices or you can configure a Remote Execute policy to run a script and then assign the policy to devices. You can remove a bundle, a package, or a list of packages.

You cannot remove a catalog by using a Remote Execute policy, but you can remove the bundles and packages contained in a catalog.

To configure a Remote Execute policy to remove bundles and packages from devices:

  1. In the ZENworks Control Center, click the Policies tab.

  2. In the Policies list, click New, then click Policy to display the Create New Policy page.

  3. In the Policy Type list, click Remote Execute Policy, then click Next to display the Policy Name page.

  4. Fill in the fields:

    • Name: (Required) Provide a unique name for the policy. The name you provide is displayed in the ZENworks Control Center interface, which is the administrative tool for ZENworks Linux Management.

      For more information, see Section C.0, Naming Conventions in the ZENworks Control Center.

    • Folder: (Required) Type the name or browse to the folder that this bundle will be created in. Folders display in the ZENworks Control Center.

    • Description: Provide a short description of the policy. This description displays on the policy's Summary page in the ZENworks Control Center interface.

  5. Click Next.

    Remote Execute Policy page
  6. Select Script from the Executable type drop-down list.

  7. Specify the waiting time after starting the script.

  8. Select Specify your own script from the Script to run drop-down list.

  9. Type your script in the script box.

    The following table provides example scripts that you can use, depend on your needs:

    Sample Script

    Description

    rug bundle-remove bundle1

    Removes bundle1 from all devices that you assign the policy to.

    rug rm package1

    Removes package1 from all devices that you assign the policy to.

    rug rm package1 package2 package3

    Removes package1, package2, and package3 from all devices that you assign the policy to. Separate the package name with spaces.

    NOTE:If you use rug rm package_name to remove a package that is contained in an installed bundle that contains other packages, only the specified package is removed from assigned devices. The other packages in the bundle are not removed.

    If a bundle has multiple packages, when one or more package is removed, the bundle is still marked as installed in the ZENworks Control Center. Depending on the bundle's schedule, the server may re-install the package.

  10. Click Next to display the Summary page.

  11. Click Finish to create the policy as configured per settings on the Summary page. If you click Finish, the Remote Execute policy is created but it does not have devices assigned or a schedule. At some point in the future, you need to configure additional options for the policy by continuing with Section 17.4, Assigning Policies.

    or

    Click Next to display the Policy Assignments page to perform the following tasks:

    • Specify assignments for this policy

    • Specify the schedule for this policy

    • Specify groups for this policy

    Policy Assignments page
  12. Assign the policy to the devices.

    1. Click Add to browse for and select the appropriate Server or Workstation objects.

      You can also select Folder or Group objects.

    2. Click the down-arrow next to Servers or Workstations to expand the list, then click the underlined link in the Name column to select the desired objects and display their names in the Selected list box.

      Assigning a policy to a Folder or Group object is the preferred method of assigning the policy. Assigning the policy to a large number of objects (for example, more than 250) might cause increased server utilization.

    3. Click OK.

  13. Click Next to display the Policy Schedule page, select the schedule to apply to the assignments from the drop-down list, which vary, depending on the schedule type you select.

    The settings you configure on this page determine when the policy is assigned to devices.

    The following schedules are available. Click the link in the left column for more information about each schedule type and its options.

    Schedule Type

    Description

    No Schedule

    Use this option to indicate no schedule; no action occurs.

    Date Specific

    Select one or more dates on which to assign the policy to devices and set other restrictions that might apply.

    Day of the Week Specific

    Select one or more days of the week on which to assign the policy to devices and set other restrictions that might apply.

    Monthly

    Select the day of the month on which to assign the policy to devices and set other restrictions that might apply.

    Relative to Refresh

    Schedule when the policy is assigned, either immediately after the device refreshes or a specified amount of time after the device refreshes. You can also specify whether the policy's assignment is repeated and specify a time period when you do not want the policy assigned to help minimize network traffic during that time.

  14. Click Next to display the Policy Groups page.

    Policy Groups page
  15. (Optional) Click Add to open the Select Groups dialog box, then click the underlined links in the Name column to select the desired policy groups and display their names in the Selected list box.

    Using policy groups eases administration efforts by letting you group several policies so you can use common assignments, schedules, and so forth, rather than configuring these settings for each policy you create.

  16. Click Next to display the Finish page.

  17. Review the information on the Finish page, making any changes to the policy settings by using the Back button as necessary. Click Finish to create the policy as configured per settings on the Finish page.