Last active
May 25, 2026 15:19
-
-
Save santisq/3879b991f39caab1c9ba816bfa14529a to your computer and use it in GitHub Desktop.
Brave debloat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "Requires sudo: 'sudo $0'." | |
| exit 1 | |
| fi | |
| sudo mkdir -p /etc/brave/policies/managed/ && \ | |
| sudo tee /etc/brave/policies/managed/brave_policy.json > /dev/null << 'EOF' | |
| { | |
| "BraveRewardsDisabled": true, | |
| "BraveWalletDisabled": true, | |
| "BraveVPNDisabled": true, | |
| "BraveAIChatEnabled": false, | |
| "BraveStatsPingEnabled": false, | |
| "BraveNewsDisabled": true, | |
| "BraveTalkDisabled": true, | |
| "BraveP3AEnabled": false, | |
| "UrlKeyedAnonymizedDataCollectionEnabled": false, | |
| "SafeBrowsingExtendedReportingEnabled": false, | |
| "MetricsReportingEnabled": false | |
| } | |
| EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #requires -RunAsAdministrator | |
| $registryPath = 'HKLM:\SOFTWARE\Policies\BraveSoftware\Brave' | |
| if (-not (Test-Path -Path $registryPath)) { | |
| New-Item -Path $registryPath -Force | |
| } | |
| $set = @' | |
| 1,BraveRewardsDisabled | |
| 1,BraveWalletDisabled | |
| 1,BraveVPNDisabled | |
| 0,BraveAIChatEnabled | |
| 0,BraveStatsPingEnabled | |
| 1,BraveNewsDisabled | |
| 1,BraveTalkDisabled | |
| 0,BraveP3AEnabled | |
| 0,UrlKeyedAnonymizedDataCollectionEnabled | |
| 0,SafeBrowsingExtendedReportingEnabled | |
| 0,MetricsReportingEnabled | |
| '@ | ConvertFrom-Csv -Header Value, Name | |
| $set | ForEach-Object { | |
| $newItemPropertySplat = @{ | |
| Path = $registryPath | |
| Name = $_.Name | |
| Value = $_.Value | |
| PropertyType = 'DWord' | |
| } | |
| New-ItemProperty @newItemPropertySplat | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment