How could I delete Google Chrome User Data files by prompt command?
18,815
The Default
folder is still there after running the batch file
DEL %LOCALAPPDATA%\Google\Chrome\"User Data"\Default*.* /F /S
You are missing a \
after Default
.
The following command should work:
DEL %LOCALAPPDATA%\Google\Chrome\"User Data"\Default\*.* /F /S
But I don't want to be prompted
Add /Q
to set "Quiet mode, do not give a Yes/No Prompt before deleting."
DEL %LOCALAPPDATA%\Google\Chrome\"User Data"\Default\*.* /F /S /Q
But I want to remove the directories as well.
Use rd
to remove the directories
RD %LOCALAPPDATA%\Google\Chrome\"User Data"\Default /s /q
Further Reading
- An A-Z Index of the Windows CMD command line
- A categorized list of Windows CMD commands
- del - Delete one or more files.
- rd - Delete folder(s).
Related videos on Youtube
Author by
Marlon
Enthusiastic about Devops tools, infrastructure and multicloud.
Updated on September 18, 2022Comments
-
Marlon over 1 year
Would like to delete this folder and file:
DEL %LOCALAPPDATA%\Google\Chrome\"User Data"\Default*.* /F /S DEL %LOCALAPPDATA%\Google\Chrome\"User Data"\First
Trying to execute in a batch file they don't work as expected. (Default folder still there after running).
Anything is wrong?
These files are from Google Chrome, so it's a just way to reset the browser by command prompt.
-
Biswapriyo almost 7 yearsMost of the settings are saved in
Preferences
file in thatdefault
directory. -
DavidPostill almost 7 years@Biswa So? The OP said "it's a just way to reset the browser by command prompt". Resetting the browser is a lot more than just preferences.
-
Biswapriyo almost 7 yearsSo alternatively, to reset user data, one may delete only the
Preferences
file, no need to remove wholedefault
folder :) -
DavidPostill almost 7 years@Biswa The OP wants to completely reset the browser. That folder also contains the cache, extension, extension settings, session storage, cookies, history etc ... which are all user data.