Understanding the AppData folder in Windows and learning how to clean it up can significantly improve your system’s performance and free up valuable disk space.
The AppData folder is crucial in storing application data, settings, and caches. Still, over time, it can become bloated with unnecessary files, leading to slower performance and potential privacy concerns.
Table of Contents
What is the AppData Folder?
Microsoft introduced the AppData folder in Windows 7 in 2009. Since then, it has been an integral part of the operating system. The AppData folder lives in a profile folder for each Windows user. Apps on your computer save various user-specific files and settings.
For example, Minecraft, one of the most popular games in the world, stores worlds and saves in the AppData folder.
The AppData folder on Windows 10 and 11 has three subfolders: Local, LocalLow, and Roaming. Here is what they do:
- Local. This folder stores device-specific settings and temporary files. There is a separate environment variable %LOCALAPPDATA% for this folder that you can use in your batch files and scripts.
- LocalLow. Here Windows stores mainly buffer data generated by various apps (Internet Explorer, Java, Adobe, etc.). It is also used by low-level access systems, for example, for temporary files of your browser when working in protected mode. This directory also cannot be moved to another computer.
- Roaming. You can transfer files in this folder to another computer. The Roaming folder stores browser data, bookmarks, etc. This directory allows users to always work with a familiar environment on any Remote Desktop Services farm server when using roaming profiles or User Profile Disks. The environment variable for this directory is %APPDATA%.
Where Can You Find the AppData Folder in Windows?
Each user on a Windows computer has a profile folder in which the AppData folder is a subdirectory. Since its inception in Windows 7, the default location has been in:
<OS_Drive>:\Users\<Username>\AppData
Paste the following location in the Run dialog to open it using Windows Explorer.
%userprofile%\AppData
Or directly in the Windows Explorer address bar, and it automatically resolves to the target AppData folder location.
In PowerShell, you can navigate the AppData folder using this location.
Push-Location -Path $env:userprofile\appdata Get-ChildItem
You can also open the AppData folder in Windows Explorer from PowerShell by running the Invoke-Item cmdlet. This cmdlet opens the item in its default associated app, which in this case, is a folder that opens in Windows Explorer.
Invoke-Item -Path $env:userprofile\appdata
Ways to Clean Up the AppData Folder?
The AppData folder becomes larger with each new app you install. The more programs and games on your computer, the larger the size of the AppData folder. Windows itself doesn’t control the size of this folder, which means its growth is uncontrolled and may consume all free storage space.
If your computer is running low on disk space, one of the places to check for potential cleanup is the AppData directory.
More importantly, uninstalling a program or game usually does not remove files in the AppData folder. As a result, the AppData folder becomes filled with files and folders you no longer need or use.
Important. Do not Shift + Delete the AppData folder. Such a brutal method will harm other apps on your computer. There is a dedicated tool for cleaning the AppData folder in Windows.
Using the Built-In Temporary Files Clean-Up App
One way is to use the Settings app to remove temporary files, which include the safe-to-delete items in the AppData folder.
- Press WIN+I to launch the Settings app.
- Click System → Storage.
- Click “Temporary files.”
- You’ll see a list of temporary file categories. Select the ones you want to clean up, including the Temporary Internet Files. Once satisfied with the selection, click the “Remove files” button.
- Click “Continue” on the confirmation prompt.
Clean Up the “AppData” Folder using Windows Explorer
- Open Windows Explorer, paste %temp% in the address box, and press Enter. This string (%temp%) is a Windows environment variable that maps to the current user’s “AppData” folder.
%temp%
- Once the folder is open, delete all (or selected) files.
Note. Press SHIFT-DELETE to bypass the Recycle Bin and permanently delete the files. - Click Yes on the confirmation prompt.
- Some files cannot be deleted because they are being used by other programs—which is normal. When you receive such a notification, check the “Do this for all current items” box and click Skip.
Clean Up the “AppData” Folder using PowerShell
Using a one-liner PowerShell command, you can also clean up the AppData folder. This PowerShell command searches for all files in the user’s temporary folder (including files in subdirectories) and then deletes them without asking for confirmation.
Remove-Item ` -Path "$env:temp\*" ` -Recurse -Confirm:$false ` -ErrorAction SilentlyContinue ` -Verbose
This PowerShell command will recursively remove all files and subdirectories within the user’s temporary folder without asking for user confirmation. The command will proceed silently without displaying error messages if errors occur during the process. However, it will show verbose messages for each item it deletes.
- Remove-Item: This is the cmdlet used to delete items (files and directories).
- Path “$env:temp\*”: This path parameter specifies the target directory for deletion. The value is “$env:temp”, the user’s temporary folder path.
- Recurse: This Remove-Item parameter tells it to perform a recursive deletion. It means that not only will the files in the specified directory be deleted, but any files and subdirectories within it will also be removed.
- Confirm:$false: This is another parameter for Remove-Item, which disables the confirmation prompt before deletion. By setting this to “$false”, the command will not ask for user confirmation, and all items will be deleted directly.
- ErrorAction SilentlyContinue: This parameter specifies the desired behavior for error handling. In this case, “SilentlyContinue” means that if errors occur during the deletion process (e.g., if some files or directories cannot be removed due to access restrictions), the command will continue without displaying error messages.
- Verbose: This parameter enables the verbose mode, which means the command will display detailed information about its actions. In this case, it will show a message for each item (file or folder) that gets deleted.
Move the Roaming Folder Mapping to Another Drive
Instead of playing catch up with the AppData folder size, moving the “AppData” folder to another drive with more storage space may be more practical.
- Open the AppData folder in Windows Explorer.
- Select the Roaming folder and press ALT+ENTER to open the folder properties.
- Switch to the Location tab, enter the new Roaming folder location, and click OK. In this example, I’ll move the Roaming folder location to the X drive and retain the folder structure.
- Click Yes to automatically create the new location if it doesn’t exist.
- Click Yes to move all files to the new location.
- Wait for the file copy to finish.
Move the Temp Folder Mapping to Another Drive
Like the Roaming folder, you can also move the Temp folder mapping to another drive. But this time, moving the files from the old to the new location is not required since those are just temporary files. Let’s perform this method in PowerShell.
- Open PowerShell and run the following command to confirm the current TEMP and TMP folder locations.
[System.Environment]::GetEnvironmentVariable('TEMP', 'User') [System.Environment]::GetEnvironmentVariable('TMP', 'User')
As you can see, the TEMP location is on the C drive.
- Run the following commands to specify the new TEMP folder location. In this example, I’ll point the TEMP and TMP folder mappings to ‘X:\Users\june\AppData\Local\Temp’.
$newTempDir = 'X:\Users\june\AppData\Local\Temp'
- Run the command below to create the new TEMP folder if it doesn’t exist.
if (!(Test-Path $newTempDir)) { New-Item -ItemType Directory -Path $newTempDir -Force }
- Run the following commands to set the TEMP and TMP folder mappings.
[System.Environment]::SetEnvironmentVariable('TEMP', $newTempDir, 'User') [System.Environment]::SetEnvironmentVariable('TMP', $newTempDir, 'User') [System.Environment]::GetEnvironmentVariable('TEMP', 'User') [System.Environment]::GetEnvironmentVariable('TMP', 'User')
- Log off and log in to refresh the Windows environment variables.
- For now, references to the TEMP folder will be directed to the new location you specified. You can test it by opening %TEMP% in Windows Explorer or CMD and $ENV:TEMP in PowerShell.
- You can now delete the files in the old TEMP folder.
Conclusion
In this blog post, we explored the significance of the AppData folder, examining its three subdirectories: Roaming, Local, and LocalLow, each serving specific purposes for applications. By identifying the types of files in these folders, users can gain insights into how various applications impact their system’s storage.
Moreover, we delved into the step-by-step process of cleaning up the AppData folder safely. It involved navigating to the appropriate directories, clearing out temporary files, removing unused application data, and exercising caution when dealing with sensitive data. Regularly performing this cleanup can help regain disk space and optimize your Windows system’s overall performance.
It’s essential to highlight that while cleaning the AppData folder can be beneficial, users should exercise caution and avoid deleting critical files. Always back up your data and be selective when removing files to prevent unintended consequences or application malfunctions.
By taking the time to understand and manage the AppData folder, you are taking proactive measures to maintain a healthy and efficient Windows environment. Keeping this crucial area of your system tidy will ensure that your applications run smoothly, your storage remains optimized, and your computing experience stays enjoyable.
9 comments
The issue I run into isn’t so much temp files in AppData, but rather other junk files in AppData left by applications that were removed. It would be nice if there was an easy way to get rid of this old and unused data that just eats up space.
Thanks for this article which gives a decent insight in to the workings of the appdata folder. Most of the bloat in appdata comes from the browsing folders and application folders within the roaming area of Appdata and there is no way to clean it. I hope MS will one in the distant future provide that. We may not be living by then and windows OS may not be in operation even.
Wow serious help and so well explained.
Cleared up 25%+ of stuff that now sits on my D drive and my SSD has room for more games :-)
TYVM
Helpful, Thanks
Very helpful, thank you. I only did the temporary files and roaming folder and cleared up 25+ GB.
An excellent article with very safe suggestions. If you have a (Windows Linux Subsystem[1]) shell installed, you can type a few linux commands with ‘du’ to see a little more granulararity what is in %APPDATA%:
# search for Gigabytes
root@rferrisxASUS:/mnt/c/Users/rferrisx/AppData# du -d 3 -h | grep -P ‘[0-9]G’
1.8G ./Local/Google/Chrome
1.8G ./Local/Google
1.5G ./Local/Microsoft
23G ./Local/Packages/Clipchamp.Clipchamp_yxz26nhyzhsrt
23G ./Local/Packages
30G ./Local
4.1G ./LocalLow/Google/GoogleEarth
4.1G ./LocalLow/Google
4.7G ./LocalLow
1.4G ./Roaming
36G .
root@rferrisxASUS:/mnt/c/Users/rferrisx/AppData/Local/Google# du -d 3 -h | grep -P ‘[0-9]G’
1.8G ./Chrome/User Data
1.8G ./Chrome
1.8G .
# search for Megabytes
root@rferrisxASUS:/mnt/c/Users/rferrisx/AppData/Local/Google# du -d 3 -h | grep -P ‘[0-9]M’
4.0M ./Chrome/User Data/BrowserMetrics
3.3M ./Chrome/User Data/ClientSidePhishing
7.7M ./Chrome/User Data/Crashpad
938M ./Chrome/User Data/Default
22M ./Chrome/User Data/GrShaderCache
231M ./Chrome/User Data/Guest Profile
7.0M ./Chrome/User Data/hyphen-data
5.2M ./Chrome/User Data/MediaFoundationWidevineCdm
7.8M ./Chrome/User Data/OnDeviceHeadSuggestModel
18M ./Chrome/User Data/pnacl
29M ./Chrome/User Data/PnaclTranslationCache
194M ./Chrome/User Data/Profile 1
31M ./Chrome/User Data/Safe Browsing
9.1M ./Chrome/User Data/ShaderCache
26M ./Chrome/User Data/SwReporter
231M ./Chrome/User Data/System Profile
1.7M ./Chrome/User Data/ZxcvbnData
[1] WSL install instructions at https://learn.microsoft.com/en-us/windows/wsl/install
I Moved the Roaming Folder Mapping to Another separate Drive but the original roaming folder is still taking up the same space on my C drive. Can I delete that original roaming folder now?
Yeah! the same here! There is no more Location tab on the on the original Roaming Folder!
There is no new folder created on new HD either!
I moved my Roaming folder to another drive, waited a few days then checked. The original Roaming had not changed, while the one on the new drive had expanded. As a precaution i copied the original Roaming folder to a separate location, then deleted the original Roaming folder . I then emptied the C drive Recycle bin and rebooted. All went well and my C drive is now dseveral Gigabytes lighter