cleanupd command
Use the cleanupd command to clean (that is, delete) update files and information in the update library.
Synopsis
smcli cleanupd [-h | -? | --help]
smcli cleanupd [-v] [-m] [-F] {-a | -f file_name | -P query | [-u] update_list}
Description
This command cleans up the update library. By default, only the installable files in the update library are deleted. Deleting the update information is optional.
- An update might have physical files and corresponding information in locations other than the update library on the management server. These files are not cleaned up.
- You cannot delete update information without also deleting the installable files. If you want to keep the installable update files, create a copy in another location before cleaning in the library.
Operands
This command optionally uses a list of updates as an operand. The list can optionally be preceded by the -u | --update option.
Options
- -a | --all
- Cleans (deletes) all installable files from the update library.Tip: If the -m | --metadata option is specified, all update information (metadata) is also deleted.
- -f | --file {file_name | -}
- Retrieves data either from the input file file_name or
from input piped from another command.
To retrieve input piped from another command, specify a hyphen (-) instead of a file name (for example, smcli cmd1 | smcli cmd2 -f -). To retrieve input from a file, specify the full path. If the path contains spaces, enclose it in quotation marks.
- The input data is the list of IDs or fix IDs for the update, separated by commas or line breaks. See the -u | --updates option for more information.
- -F | --force
- Forces the deletion of update information (metadata) for updates that require, supersede, or contain member updates, and also deletes required updates, superseded updates, and updates that are members of another update.
- -h | -?
- Displays the syntax and a brief description of the command. Tip: If you specify additional options other than -h | -? | --help, the options are ignored.
- --help
- Displays detailed information about the command, including the
syntax, a description of the command, a description of the options
and operands, error codes, and examples. Tips:
- If you specify additional options other than -h | -? | --help, the options are ignored.
- You can also display detailed help in the form of man pages using the man command_name command.
- -m | --metadata
Deletes update information (metadata) in addition to installable files and update descriptor files in the update library.
Tip: To use the -m option with the -a option, use the following format:smcli cleanupd -am
Tip: If this option is specified without the -F | --force option, and update information (metadata) is for an update that is required, superseded, or a member of another update, the cleanup for that update will fail.- -P | --patchfilter "query"
- Targets one or more updates (patches) based
on update attributes specified by query. The query operand is a string, enclosed in quotation marks, that defines a simple SELECT query using the following format:
"attribute_key='value' [{AND | OR} attribute_key='value'...]"
Where attribute_key can be any valid attribute, and value is the value of the attribute. The value must match the expected type for the associated attribute. For example, if the attribute is of type string, a string must be specified.
Tips:- Use the logical operators =, !=, >, <, >=, or >= between the key and value
- Use logical operators AND or OR to combine attributes.
- Use parenthesis to create nested logical constructs.
- Only update attributes can be specified. Use the lsupd -l command to list the available update attributes.
- Always enclose query in double quotation marks (for example, "Severity=0"). Do not use quotation marks within the query.
- Enclose the value in single quotation marks if it contain special characters, including space, =, <, >, !, ), and (.
- Only update attributes can be specified. Use the lsupd -l command to list the available update attributes.
- -u | --updates {update_oid | update_fix_id}[,{update_oid | update_fix_id}...]
- Targets one or more valid updates, specified by ID or fix ID (also
called update ID).
The list can be a mixture of IDs and fix IDs, separated by a comma. The list is delimited by the end-of-line character when read from a file.
- update_oid
- Specifies the unique ID of an update, specified as a hexadecimal
value prefixed with 0x (for example, 0x37).Tip: Use the lsupd -o command to list all update IDs.
- update_fix_id
- Specifies the unique fix ID of an update (for example, SF99001G-47).Tip: Use lsupd -A DisplayName,UpdateId to list the current fix IDs.
- -v | --verbose
- Writes verbose messages to standard output.
If this option is not specified, this command suppresses noncritical messages.
Exit status
The following codes are returned by this command.- 0: The operation completed.
- 1: A usage error occurred.
- 2: The command or bundle was not found.
- 3: The command was not performed because either authentication failed or you are not authorized to perform the action.
- 29: The specified locale is not valid or not supported.
- 55: An error occurred while cleaning one or more updates.
- 101: An update being cleaned is dependent on another update. The -F |--force option must be specified for a successful deletion.
- 102: Command could not complete because a database error occurred.
Examples
- Clean all update files and informationThis example illustrates how to delete all installable files, update descriptor files, and information from the update library.Important: Use this command with care. It cannot be undone.
smcli cleanupd -am
- Clean update files for multiple updatesThis example illustrates how to delete the installable files for the updates with fix ID brcm_fw_nic_1.0.0_windows_32-64 and ID 0x78 from the update library. The update information is not deleted, so the installable files can be downloaded again. This command also displays verbose messages.
smcli cleanupd -v brcm_fw_nic_1.0.0_windows_32-64,0x78