clear
Remove specified program metadata such as instructions, symbols, comments, and references from selected addresses or ranges in a Ghidra project.
Instructions
Clear selected program metadata using Ghidra's Clear With Options command.
If `clear_types` is omitted or empty, every clear option is enabled,
matching a full Clear With Options selection. Otherwise, only the requested
`clear_types` are enabled. Supported values are:
`instructions`, `data`, `symbols`, `comments`, `properties`, `functions`,
`registers`, `equates`, `user_references`, `analysis_references`,
`import_references`, `default_references`, and `bookmarks`. `all` expands
to every clear type.
With a single `target`, this clears the code unit containing that address,
matching Clear With Options with no listing selection. With `end`, `length`,
or `ranges`, it clears over that selection.
Args:
program: Required Ghidra project path or name to target.
clear_types: Clear option names to enable exactly. Omit to clear all
supported types.
target: Address, exact label, or function name. Required unless
`ranges` is supplied.
end: Inclusive end address for a contiguous selection.
length: Byte length for a contiguous selection starting at `target`.
ranges: Optional list of range objects, each with `start` plus optional
`end` or `length`, for non-contiguous selections.
timeout: Bridge execution timeout in seconds.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | ||
| length | No | ||
| ranges | No | ||
| target | No | ||
| program | Yes | ||
| timeout | No | ||
| clear_types | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |