Skip to content

Instantly share code, notes, and snippets.

@santisq
Last active May 25, 2026 15:19
Show Gist options
  • Select an option

  • Save santisq/3879b991f39caab1c9ba816bfa14529a to your computer and use it in GitHub Desktop.

Select an option

Save santisq/3879b991f39caab1c9ba816bfa14529a to your computer and use it in GitHub Desktop.
Brave debloat
#!/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
#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