---
schema_version: "1"
id: cc97af6c5c821e61200a2d4fd1cb6cfd88aac05afae569e295378b381aa35a27
title: sf scanner rule remove (Retired)
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/code-analyzer/salesforce-code-analyzer/guides/v3x/command-reference/remove.md
canonical_url: https://developer.salesforce.com/docs/platform/salesforce-code-analyzer/guide/remove.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: bd6ae68558fef2f486d9a9662d3d02fed1c5d3c8e66b8bb628e075483c578c44
products:
  - Salesforce Code Analyzer
---
# sf scanner rule remove (Retired)

Removes custom rules from the registry of available rules. Use the `-p|--path` parameter to specify one or more paths to remove. If you don't specify any parameters, the command lists all valid custom paths but doesn't remove any.


## Examples

Review these examples for some ideas on how to run `scanner rule remove`.

### Registered Custom Paths

This example runs the command without arguments to see a list of registered custom paths.

```
  $ sf scanner rule remove
```

### Deregister Rules

This example uses the `--path` parameter to deregister the rules defined in `somerules.jar` and `myrules.xml`, and all JARs/XMLs contained in the `rules` folder.

```
  $ sf scanner rule remove --path "~/path/to/somerules.jar,~/path/to/category/apex/myrules.xml,~/path/to/folder/containing/rules"
```

#### Replace this value:

- `~/path/to/somerules.jar,~/path/to/category/apex/myrules.xml,~/path/to/folder/containing/rule`: One or more paths to remove.

### Remove All Rules

This example uses the `--force` flag to bypass the confirmation prompt, removing all rules defined in `somerules.jar`. By default, a list of all the rules that are deregistered is displayed, and the action must be confirmed. To bypass that confirmation, use the `--force` flag.

```
  $ sf scanner rule remove --force --path ~/path/to/somerules.jar
```

#### Replace this value:

- `~/path/to/somerules.jar`: One or more paths to remove.

## Usage

`sf scanner rule remove `

&nbsp;&nbsp; [`-f`]

&nbsp;&nbsp; [`-p` PATH_LIST]

&nbsp;&nbsp; [`--json`]

&nbsp;&nbsp; [`--verbose`]


## Flags

`-f` <b>|</b> `--force`

> Optional
>
> Bypasses the confirmation prompt and immediately removes the rules.
>
> Type: boolean

`-p` <b>|</b> `--path` PATH_LIST

> Optional
>
> One or more paths to remove. Specify multiple values with a comma-separated list.
>
> Type: option

`--json`

> Optional
>
> Format output as JSON.
>
> Type: boolean

`--verbose`

> Optional
>
> Emit additional command output to stdout.
>
> Type: boolean

