delete

You can use the delete command to remove the scheduling or security items from the database.

Overview

You can use the command option to delete items located at specific folder or a multiple items that are located at different folders. You must have the delete access to remove scheduling items.

Important: You must make sure that the item you want to delete is not locked by any other user.

Syntax and command line options

Before you run the command, you must give at least one scheduling or security item that you want to delete. The noask parameter is optional. You can run the command as follows:
ocli model delete | del | de Scheduling or Security item [;noask]
For the list of scheduling or security items that you can use and the required format, see the following tables.
Scheduling and Security items
Table 1. Scheduling items
Scheduling items Description
apikey Label If you specify the name of the apikey (Label), the details of that specific apikey are deleted or else the details of all the apikeys are removed from the database.
Restriction: The service apikeys are not deleted when you perform this action.
calendars | calendar | cal [folder/]calname You can specify the name of the calendar that you want to delete. Optionally, you can provide the folder in which the calendar is defined. If you do not specify the calname, all the calendar definitions are deleted. Wildcard characters are permitted.
folder | fol foldername If you do not provide the foldername or if the folder contains scheduling items, an error message is displayed. Wildcard characters are permitted.
jobs | jobdefinition | jd [[folder/]workstationame#][folder/]jobname You can specify the jobname that you want to delete. You can provide [folder/]workstationame#] and the folder in which the job stream is defined to make the selection more specific. Wildcard characters are permitted.
sched | jobstream | js [[folder/]workstationame#][folder/]jstreamname[valid from date|valid to date |valid in date date] [;full] [;force] You must specify the jstreamname that you want to delete. You can provide [folder/]workstationame#] and the folder name to make the selection more specific. Wildcard characters are permitted. You can also add the options below to provide more details of the job stream.

Valid from date: You can specify a date which will restrict the selection of job streams, that have a valid from date equal to the value specified. The format is mm/dd/yyyy.

Valid to date: You can specify a date which will restrict the selection of job streams, that have a valid to date equal to the value specified. The format is mm/dd/yyyy.

valid in date date: Specify the time frame at which the job is run. You can specify one of the dates as @. The format is mm/dd/yyyy-mm/dd/yyyy.

full: If you add the option, all the job definitions in the job stream are displayed.

Important: To delete a job stream that has been referenced in other items, use the command ./ocli model delete js jobstreamSelector ;force. When you use force, not only the job streams are deleted, but also all the references associated with it.
parms | parm | variable | vb [[folder/]tablename.]variablename You must provide the [[folder/]tablename.]variablename to delete specific variable within a specific table. If you specify the variablename only, the variable definition in the default variable is deleted. If you do not provide the [[folder/]tablename.]variablename, all the global variable definitions in the default variable table are deleted. Wildcard characters are permitted on both [folder/]tablename and variablename.
users | user [[folder/]workstationame#]username] You can specify the username that you want to delete. Optionally, you can provide the folder in which the user is defined. Wildcard characters are permitted.
vartable | vt [folder/]tablename You can specify the name of the variable table that you want to delete. Optionally, you can provide the folder in which the variable table is defined. If you do not specify the tablename, all the variable table definitions are deleted. Wildcard characters are permitted.
workstation | ws | cpu {[folder/]workstationame You can specify the name of the workstation that you want to delete. Optionally, you can provide the folder in which the items are located. Wildcard characters are permitted.
Table 2. Security items
Security items Description
accesscontrollist | acl foldername|F+foldername|A+ADMIN You can specify the foldername|F+foldername|A+ADMIN to delete a particular access control list definition. If you do not provide any value for foldername|F+foldername|A+ADMIN, all the definitions are deleted. Wildcard characters are permitted.

foldername|F+foldername: You can specify the option if you want to filter out the lists that are associated with a folder. The security roles are valid, only for the items available in the folder.

A+ADMIN: You can specify this option, if you want to filter out the lists that allows specific permissions on API keys (that are not defined in folders) and on agent registration action.

securityrole | srol securityrolename You must provide the securityrolename to delete a specific security role definitions. If you do not provide any securityrolename all the security roles definitions are deleted. Wildcard characters are permitted.

;noask

When you add the noask option as an argument, the agent does not ask for confirmation before it acts on each qualifying item.

Examples

  1. Run the following command to delete sac5 stored in the oldfolder folder that is launched on workstation stat1 stored in the test folder:
    ocli model delete jobs=test/stat1#oldfolder/sac5
  2. Run the following command to delete all workstations with names starting with xl:
    ocli model de cpu=xl@
  3. Run the following command to delete all job streams stored in the folder path test/oldfolder on all workstations:
    ocli model de sched=@#test/oldfolder/@