forked from Ebaad69/EVA
-
Notifications
You must be signed in to change notification settings - Fork 1
/
win-debloat.sh
30 lines (25 loc) · 1.08 KB
/
win-debloat.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
cd "$(dirname "$0")"
shopt -s extglob
if ! [[ -d "Program Files" && -d "Windows/System32" ]]
then
echo error: directory does not appear to be the root directory of a windows installation
exit 1
fi
wildcard_names=(
"onedrive"
"edge"
)
rm -rf Program\ Files/WindowsApps/*
rm -rf ProgramData/Packages/!("MicrosoftWindows.Client.CBS_cw5n1h2txyewy")
rm -rf Users/*/AppData/Local/Microsoft/WindowsApps/!("MicrosoftWindows.Client.CBS_cw5n1h2txyewy")
rm -rf Users/*/AppData/Local/Packages/!("Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy"|"windows.immersivecontrolpanel_cw5n1h2txyewy"|"MicrosoftWindows.Client.CBS_cw5n1h2txyewy")
rm -rf Windows/SystemApps/!("ShellExperienceHost_cw5n1h2txyewy"|"Microsoft.UI.Xaml.CBS_8wekyb3d8bbwe"|"MicrosoftWindows.Client.CBS_cw5n1h2txyewy"|"MicrosoftWindows.Client.Core_cw5n1h2txyewy")
rm -rf "Windows/System32/smartscreen.exe"
rm -rf "Windows/System32/mobsync.exe"
rm -rf "Windows/System32/SecurityHealthSystray.exe"
for i in "${wildcard_names[@]}"
do
echo info: removing $i
find . -ipath "*$i*" -not -ipath "./bin/*" -delete
done
exit 0