-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy pathdebloat.sh
91 lines (84 loc) · 1.98 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
cd "$(dirname "$0")"
if [[ -d "Program Files" ]] && [[ -d "Windows/System32" ]]
then
echo info: valid windows installation detected, continuing
else
echo error: directory does not appear to be the root directory of a windows installation
echo info: exiting
exit 1
fi
wildcard_names=(
"flashplayer"
"backgroundtaskhost"
"gamebarpresencewriter"
"mobsync"
"smartscreen"
"wsclient"
"wscollect"
"searchui"
"comppkgsrv"
"upfc"
"applocker"
"autologger"
"clipsvc"
"clipup"
"DeliveryOptimization"
"DeviceCensus"
"diagtrack"
"dmclient"
"dosvc"
"EnhancedStorage"
"hotspot"
"invagent"
"msra"
"sihclient"
"slui"
"startupscan"
"storsvc"
"usoapi"
"usoclient"
"usosvc"
"WaaS"
"windowsmaps"
"windowsupdate"
"wsqmcons"
"wua"
"wus"
"defender"
"onedrive"
"mcupdate_AuthenticAMD"
"mcupdate_GenuineIntel"
"skype"
"microsoftedge"
"edge"
"usocore"
"usocoreworker"
"securitycenter"
)
rm -rf "Program Files/Windows Defender"
rm -rf "Program Files (x86)/Microsoft"
rm -rf "Program Files (x86)/Windows Defender"
rm -rf "Program Files/Windows Defender Advanced Threat Protection"
rm -rf Windows/System32/wua*
rm -rf Windows/System32/wups*
rm -rf "Windows/diagnostics/system/Apps"
rm -rf "Windows/diagnostics/system/WindowsUpdate"
rm -rf "Windows/System32/smartscreenps.dll"
rm -rf "Windows/System32/SecurityHealthAgent.dll"
rm -rf "Windows/System32/SecurityHealthService.exe"
rm -rf "Windows/System32/SecurityHealthSystray.exe"
rm -rf Windows/WinSxS/Temp/PendingDeletes/*
for i in "${wildcard_names[@]}"
do
echo info: removing $i
find . -iname *$i* -exec rm -rf "{}" \;
done
echo info: searching for files that are supposed to be removed
echo info: if anything appears while searching here, it is likely that the process failed
for i in "${wildcard_names[@]}"
do
echo info: searching for $i
find . -iname *$i*
done
echo info: done
exit 0