# Remove-PackageUpdateRule

LLMS index: [llms.txt](/llms.txt)

---

<!-- This file is auto-generated using PlatyPS + HUGO Workflow automation. Avoid editing directly! Original Front-Matter:
date: 2026-06-22
document type: cmdlet
external help file: PackageUpdateInfo-Help.xml
flagTranslation: Primary
HelpUri: https://packageupdateinfo.andibellstedt.com/docs/commands/remove-packageupdaterule/
Locale: en-US
Module Name: PackageUpdateInfo
ms.date: 06/22/2026
PlatyPS schema version: 2024-05-01
title: Remove-PackageUpdateRule
type: docs
-->



## SYNOPSIS

Removes one or more custom update-handling rules from the package update configuration.

## SYNTAX

### ById (Default)

```
Remove-PackageUpdateRule -Id <int[]> [-Force] [-PassThru] [-SettingObject <Configuration>] [-WhatIf]
 [-Confirm] [<CommonParameters>]
```

### ByInputObject

```
Remove-PackageUpdateRule -InputObject <ModuleRule[]> [-Force] [-PassThru]
 [-SettingObject <Configuration>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## ALIASES

This cmdlet has the following aliases,

## DESCRIPTION

Removes existing custom rules that define how specific PowerShell modules should be handled during update checks and reporting.
The command can remove rules by rule Id, by piping in rule objects from Get-PackageUpdateRule,
or by updating a settings object that contains the rule collection.

When rules are removed, the updated configuration is written back to the settings file so the change persists.
Use -PassThru to return the removed rule objects to the pipeline.

## EXAMPLES

### EXAMPLE 1

```powershell
PS C:\> Get-PackageUpdateRule | Remove-PackageUpdateRule
```

Removes all custom update rules from the current module settings.

### EXAMPLE 2

```powershell
PS C:\> Remove-PackageUpdateRule -Id 12
```

Removes the custom rule with Id 12 from the current configuration.

### EXAMPLE 3

```powershell
$rules = Get-PackageUpdateRule -Name "Microsoft.PowerShell.Utility"
PS C:\> $rules | Remove-PackageUpdateRule -PassThru
```

Removes the matching rules and returns the removed rule objects to the pipeline.

### EXAMPLE 4

```powershell
$settings = Get-PackageUpdateSetting
PS C:\> Remove-PackageUpdateRule -Id 3 -SettingObject $settings -Force
```

Removes a specific rule without prompting and writes the updated settings back to disk.

## PARAMETERS

### -Confirm

If this switch is enabled, you will be prompted for confirmation before executing any operations that change state.

```yaml
Type: SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -Force

Suppresses the confirmation prompt and removes the rule immediately.

```yaml
Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -Id

The Id of the rule to remove.
Accepts one or more rule identifiers.

```yaml
Type: Int32[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ById
  Position: Named
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -InputObject

One or more rule objects to remove.
These are typically returned by Get-PackageUpdateRule.

```yaml
Type: ModuleRule[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ByInputObject
  Position: Named
  IsRequired: true
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -PassThru

Returns the removed rule object(s) to the pipeline for further processing.

```yaml
Type: SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -SettingObject

The configuration object that contains the rule collection.
If this parameter is not supplied, the command uses the current module settings from Get-PackageUpdateSetting.

```yaml
Type: Configuration
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: true
  ValueFromPipelineByPropertyName: true
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -WhatIf

If this switch is enabled, no actions are performed but informational messages will be displayed that explain what would happen if the command were to run.

```yaml
Type: SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.Int32[]

### PackageUpdate.ModuleRule[]

### PackageUpdate.Configuration

## OUTPUTS

### PackageUpdate.ModuleRule

## NOTES

Version  : 1.1.0.0
Author   : Andi Bellstedt
Date     : 2026-06-21
Keywords : PackageUpdateInfo, Update, Module, Rule

## RELATED LINKS

- [packageupdateinfo.andibellstedt.com/docs/commands/remove-packageupdaterule](https://packageupdateinfo.andibellstedt.com/docs/commands/remove-packageupdaterule/)
