Unregister-PSRepository

Unregisters a repository.
Unregister-PSRepository [-Name*] <String[]> [<CommonParameters>]

The Unregister-PSRepository cmdlet unregisters a repository for the current user.

Parameters
-Name <String[]>

Specifies an array of names of the repositories to remove.

<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,ErrorAction, ErrorVariable, WarningAction, WarningVariable,OutBuffer, PipelineVariable, and OutVariable.

Examples
  1. Unregister a repository:
    PS C:> Unregister-PSRepository -Name "myNuGetSource"
    

    This command unregisters the repository named myNuGetSource.

  2. Unregister all repositories:
    PS C:> Get-PSRepository | Unregister-PSRepository
    

    This command uses Get-PSRepository to get all registered repositories, and uses the pipeline operator to pass them to Unregister-PSRepository to unregister them. Note that PSGallery is a built-in repository and cannot be unregistered.

Related Links

Get-PSRepository
Register-PSRepository
Set-PSRepository