The AppData system folder in Windows is the default location for application data, settings, and caches. Over time, it can become bloated with unnecessary files, which can lead to slower performance and take up free space on your hard drive.
Table of Contents
What is the AppData Folder in Windows
In the profiles of each Windows user, there is a hidden folder called AppData (%userprofile%\AppData). Applications that the user is using usually store their data and cache in this folder.
The AppData folder on Windows has three subfolders:
- Local – device-specific settings and temporary files are stored in this folder (you can access this directory using the environment variable %LOCALAPPDATA%);
- LocalLow – used for low-integrity application data (typically by apps with strict security settings);
- Roaming – it stores application settings and data that can be transferred from one computer to another (environment variable %APPDATA%). This folder can be used in roaming profiles or user profile discs in an RDS environment.
The default location of the AppData folder in Windows is <OS_Drive>:\Users\<Username>\AppData.
You can quickly navigate to this directory using the following command in the Run dialog or Windows Explorer address bar:
%userprofile%\AppData
How to Clen Up the AppData in Windows
The AppData folder grows with each installed application. 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 an app doesn’t usually remove its data files from the AppData folder. As a result, the AppData folder becomes filled with files and folders you no longer need or use.
We prefer to use the WinDirStat tool to quickly analyze the disk space used in Windows. On Windows 10 and 11, WinDirStat can be installed using the built-in WinGet package manager:
winget install --id=WinDirStat.WinDirStat -e
In this example, you can see that the size of the AppData folder is about 21 GB. The graphical folder map in WinDirStat allows you to quickly find files and folders that are taking up a lot of free space. In our case, we quickly found a large vhdx image in the \AppData\Local\Packages folder left over from experimenting with WSL.
However, in most cases, you should never manually delete any folders or files from the AppData folder. Such a brutal method can harm other apps on your computer. First, use the built-in Windows tools to clean up the AppData folder.
Clen-Up Temporary Files in Windows
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, and click the “Remove files” button.
Clean Up Temp Files in the AppData Folder
Once you have closed all running applications, you can safely delete the temporary files in the AppData folder manually.
- Open the File Explorer, paste %temp% in the address box;
- The Temp folder should open in the current user’s profile. (%Username%\AppData\Local\Temp). In our case, the size of the Temp folder is about 4GB;
- Delete all (or selected) files from Temp folder;
- 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.
You can also use the PowerShell one-liner to quickly clean up the temporary files in the AppData folder:
Remove-Item ` -Path "$env:temp\*" ` -Recurse -Confirm:$false ` -ErrorAction SilentlyContinue ` -Verbose
Move the Roaming Folder Mapping to Another Drive
Rather than playing catch-up with the size of the AppData folder, it may be more practical to move the AppData folder to another drive with more space.
- Navigate to the AppData folder and open the Roaming 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.
- Restart computer and check if your apps are working properly. You can then rename the old Roaming folder to something like Roaming.bak and delete the original folder after a few days.
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:
- Now create a new location for the TEMP folder on a different drive if it doesn’t already exist:
$newTempDir = 'X:\Users\june\AppData\Local\Temp' 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')
- 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 File Explorer or CMD and $ENV:TEMP in PowerShell.
- You can now delete the remaining files in the old TEMP folder.
Now you understand what the AppData folder is used for and how to safely delete it if it starts to take up too much disk space.
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