How to remove a cached copy of an unpublished package in Microsoft App-V v5

Article ID: 2768945 - View products that this article applies to.
Expand all | Collapse all

Summary

When a previously published package is unpublished from the Microsoft Application Virtualization (App-V) Management Server, all entry points (e.g. Shortcuts, FTA's, etc.) for that package are removed from the App-V client, however the cached copy of the package is not removed (deleted) from %programdata%\App-V\{PkGID}\{VerID}.

Also when a new version of a previously cached package is  streamed, the older version of the cache is not removed. Instead, hard links are between the package files which have remained unchanged between the different versions.

NOTEThe folder %programdata%\App-V is the default path for PackageInstallationRoot. To check the path run Get-AppvClientConfiguration and examine the value of PackageInstallationRoot.

At times you might want to remove unpublished packages from the computer (eg to reclaim lost disk space). You can remove packages by running the PowerShell command Remove-AppvClientPackage. Much like uninstall native applications, the Remove-AppvClientPackagemust be run with administrative rights.

More information

Remove-AppvClientPackage supports the following inputs for the package:
  • Name
  • PackageID
  • Version
  • VersionID
To find the values the parameters listed above, you can make use of Get-AppvClientPackage -All. The output is a list of all packages which are present on the computer.

Note:
  1. The -All switch is needed to list the unpublished packages.
  2. Also the publishing status is checked for the user in whose context the command is being run.
  3. Virtual Applications which are installed via MSI should be removed from Add Remove Programs. You should not remove them by using Remove-AppvClientPackage.


From a PowerShell prompt run: Get-AppvClientPackage -all. It should return something similar to the following:

 
PS C:\temp> Get-AppvClientPackage -All

PackageId            : x1x1x1x1-x1x1-x1x1-x1x1-x1x1x1x1x1x1
VersionId            : x2x2x2x2-x2x2-x2x2-x2x2-x2x2x2x2x2x2
Name                 : MyVirtualPackage
Version              : 0.0.0.1
Path                 : c:\temp\MyVirtualPackage.appv
IsPublishedToUser    : False
UserPending          : False
IsPublishedGlobally  : False
GlobalPending        : False
InUse                : False
InUseByCurrentUser   : False
PackageSize          : 1234567
PercentLoaded        : 100
IsLoading            : False
HasAssetIntelligence : True

PackageId            : y1y1y1y1-y1y1-y1y1-y1y1-y1y1y1y1y1y1
VersionId            : y2y2y2y2-y2y2-y2y2-y2y2-y2y2y2y2y2y2
Name                 : MyVirtualPackage
Version              : 0.0.0.2
Path                 : c:\temp\MyVirtualPackage_2.appv
IsPublishedToUser    : False
UserPending          : False
IsPublishedGlobally  : False
GlobalPending        : False
InUse                : False
InUseByCurrentUser   : False
PackageSize          : 1234900
PercentLoaded        : 100
IsLoading            : False
HasAssetIntelligence : True
 

To remove the older version of the MyVirtualPackage package, run the following:


To remove a package using the PackageID, run this:

Remove-AppVClientPackage - x1x1x1x1-x1x1-x1x1-x1x1-x1x1x1x1x1x1

Just be sure to modify the Version and Package IDs used above so that they reflect the correct package you are trying to remove.

To remove all packages, including all Versions of all packages irrespective of their publishing status run the following:

Get-AppvClientPackage -All | Remove-AppVClientPackage
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2768945 - Last Review: November 6, 2012 - Revision: 1.1
Applies to
  • Microsoft Application Virtualization 5.0 for Terminal Services
  • Microsoft Application Virtualization 5.0 for Windows Desktops
  • Microsoft Application Virtualization for Terminal Services
  • Microsoft Application Virtualization for Windows Desktops
  • Microsoft Application Virtualization Hosting 5.0 for Windows Desktops
Keywords: 
KB2768945

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com