Flushing the App-V client cache
When creating a base operating image for deployment to computers and you are including the App-V client might inadvertently launch an App-V application by mistake before you’ve completed capturing the image), you might find that the package is included in the capture and thus bloats the image unnecessarily. By flushing the App-V client cache before capturing, you can ensure that no packages are included in the image.
Install your App-V client installed on a Windows 8.1/10 PC.
How to do
The following list shows you the high-level steps involved in this recipe and the tasks required to complete the recipe (all of the actions in this recipe will take place on the Windows 8.1/10 client):
- Log in as an
Administrator level idand flush the App-V Client Cache
To implement this do the following:
- On your Windows 8.1/10 client, log in with an account that has local administrator permissions.
- Launch an admin-level PowerShell session and enter the following commands:
Set-ExecutionPolicy RemoteSigned –Force Import-Module AppvClient Get-AppvClientPackage –All | Remove-AppvClientPackage Set-ExecutionPolicy Default –Force
Here, the first and last lines of the commands allow scripting to run within PowerShell and then set the scripting security settings back to their default. The second line imports the App-V commands into the PowerShell session and the third line retrieves a list of all of the App-V packages and then pipes them into a command to remove them from the client.
- To verify command ran successful, check the size of the
C:\ProgramData\App-Vfolder; it should be nearly empty with only icons and shortcuts remaining for the packages that have otherwise been flushed out