title: How to Uninstall-Module of older version
body: <p>The system appears to have two (2) versions of PowerShellGet module installed.</p>
  
  <pre><code>Script     2.2        PowerShellGet
  Script     1.0.0.1    PowerShellGet
  </code></pre>
  
  <p>How can I uninstall the older version? The <code>Uninstall-Module</code> command appears to be looking in the <code>2.2</code> directory. Why is that?</p>
  
  <pre><code>&gt;Uninstall-Module -Name 'PowerShellGet' -RequiredVersion '1.0.0.1'
  PackageManagement\Uninstall-Package : No match was found for the specified search criteria and module names 'PowerShellGet'.
  At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2\PSModule.psm1:12655 char:21
  + ...        $null = PackageManagement\Uninstall-Package @PSBoundParameters
  +                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (Microsoft.Power...ninstallPackage:UninstallPackage) [Uninstall-Package], Exception
      + FullyQualifiedErrorId : NoMatchFound,Microsoft.PowerShell.PackageManagement.Cmdlets.UninstallPackage
  </code></pre>
  
  <p>When I try to specify the older version, it reports the new version.</p>
  
  <pre><code>&gt;Get-Module -FullyQualifiedName @{ModuleName="PowerShellGet";ModuleVersion="1.0.0.1"}
  
  ModuleType Version    Name                                ExportedCommands
  ---------- -------    ----                                ----------------
  Script     2.2        PowerShellGet                       {Find-Command, Find-DscResource, Find-Module, Find-RoleCapability...}
  
  &gt;($PSVersionTable.PSVersion).ToString()
  5.1.14409.1018
  &gt;(Get-CimInstance -ClassName Win32_OperatingSystem).Caption
  Microsoft Windows 7 Enterprise
  </code></pre>