Disable automatic Visual Studio Code extension updates
- Linux onlyThis script improves your privacy on Linux
- Single actionThis page belongs to a script, containing basic changes to achieve a task.
- Impact: High
System Functionality / Data Loss Risk: High
This action improves privacy with high impact when you run the recommended script.
- Bash (Shell script)These changes use Linux system commands to update your settings.
- Sudo/root requiredThis script requires privilege access to do the system changes
- Fully reversible
You can fully restore this action (revert back to the original behavior) using this website.
The restore/revert methods provided here can help you fix issues.
Overview
By default, Visual Studio Code automatically downloads and installs updates for all extensions 1. These updates are fetched from a Microsoft online service 1.
This script disables the automatic updating of installed extensions.
It accomplishes this by setting extensions.autoUpdate
to false
2.
This script should only be used by advanced users.
This script is not recommended for daily use as it breaks important functionality.
Consider creating a system backup before doing any changes.
Sources
- vscode/extensions.contribution.ts at b784e0514d4608cc20a0e7ce62baf7bc8131158c · microsoft/vscode · GitHub. github.com. (2022).
Original: https://github.com/microsoft/vscode/blob/b784e0514d4608cc20a0e7ce62baf7bc8131158c/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts
Archived: https://web.archive.org/web/20221029171704/https://github.com/microsoft/vscode/blob/b784e0514d4608cc20a0e7ce62baf7bc8131158c/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts#L135-L150 - vscode-docs/extension-marketplace.md at 9a900b380e11530376104ffc83a004b82553728e · microsoft/vscode-docs · GitHub. github.com. (2022).
Original: https://github.com/microsoft/vscode-docs/blob/9a900b380e11530376104ffc83a004b82553728e/docs/editor/extension-marketplace.md
Archived: https://web.archive.org/web/20221029171719/https://github.com/microsoft/vscode-docs/blob/9a900b380e11530376104ffc83a004b82553728e/docs/editor/extension-marketplace.md#extension-auto-update
Apply Now
Choose one of three ways to apply:
Help
How to apply or restore "Disable automatic Visual Studio Code extension updates" using script
- ≈ 3 min to complete
- Tools: Web Browser
- Difficulty: Medium
- ≈ 5 instructions
- 1
Download
Download the script file by clicking on thebutton above.
Use button above to restore changes. - 2
Keep the file
If warned by your browser, keep the file. - 3
Open
Open the downloaded file. - 4
Exit
Once it's done, press any key to exit the window. - 5
Restart
Restart your computer for all changes to take effect.
Apply with privacy.sexy
Guided, automated application with safety checks- Recommended for most users
- Includes safety checks
- Free
- Open-source
- Popular
- Offline/Online usage
Help
How to apply or restore "Disable automatic Visual Studio Code extension updates" using privacy.sexy
- ≈ 3 min to complete
- Tools: privacy.sexy
- Difficulty: Simple
- ≈ 4 instructions
- 2
Choose script
- Search for the script name: Disable automatic Visual Studio Code extension updates
- Check the script by clicking on the checkbox.
- 3
Run
Click on ▶️ Run button at the bottom of the page.This button only appears on desktop version (recommended). On browser, use 💾 Save button.
- Apply
- Revert
if ! command -v 'python3' &> /dev/null; then
echo 'Skipping because "python3" is not found.'
else
python3 <<EOF
from pathlib import Path
import os, json, sys
property_name = 'extensions.autoUpdate'
target = json.loads('false')
home_dir = f'/home/{os.getenv("SUDO_USER", os.getenv("USER"))}'
settings_files = [
# Global installation (also Snap that installs with "--classic" flag)
f'{home_dir}/.config/Code/User/settings.json',
# Flatpak installation
f'{home_dir}/.var/app/com.visualstudio.code/config/Code/User/settings.json'
]
for settings_file in settings_files:
file=Path(settings_file)
if not file.is_file():
print(f'Skipping, file does not exist at "{settings_file}".')
continue
print(f'Reading file at "{settings_file}".')
file_content = file.read_text()
if not file_content.strip():
print('Settings file is empty. Treating it as default empty JSON object.')
file_content = '{}'
json_object = None
try:
json_object = json.loads(file_content)
except json.JSONDecodeError:
print(f'Error, invalid JSON format in the settings file: "{settings_file}".', file=sys.stderr)
continue
if property_name not in json_object:
print(f'Settings "{property_name}" is not configured.')
else:
existing_value = json_object[property_name]
if existing_value == target:
print(f'Skipping, "{property_name}" is already configured as {json.dumps(target)}.')
continue
print(f'Setting "{property_name}" has unexpected value {json.dumps(existing_value)} that will be changed.')
json_object[property_name] = target
new_content = json.dumps(json_object, indent=2)
file.write_text(new_content)
print(f'Successfully configured "{property_name}" to {json.dumps(target)}.')
EOF
fi
ImlmICEgY29tbWFuZCAtdiAncHl0aG9uMycgJj4gL2Rldi9udWxsOyB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mFtZX1cIiBzZXR0aW5nLicpXG5FT0ZcbiAgZmki
Help
How to apply or restore "Disable automatic Visual Studio Code extension updates" using commands
- ≈ 2 min to complete
- Tools: Terminal
- Difficulty: Medium
- ≈ 3 instructions
- 1
Open terminal
Open your terminal application. - 2
Copy code
Copy the code: - 3
Paste & run
Paste the commands into terminal application and press Enter to run.Some changes require a system restart to take effect
Similar Guides
Wider Goal
Guides below includes this guide to achieve a wider goal.See other more general settings that includes this one as one of its actions.
These plans combine multiple privacy settings, including this one, for stronger protection.
- Configure auto-update settings for Visual Studio Code extensions
- Disable Visual Studio Code data collection
- Configure programs
These scripts control the automatic update behavior of extensions. Updates are fetched from Microsoft servers. Use of online Microsoft services can disclose inform...
Visual Studio Code, also commonly referred to as VS Code, is a source-code editor made by Microsoft. Visual Studio Code makes outgoing network requests to collect ...
These scripts configure third-party applications installed on Linux distributions to harden their security and privacy to protect your data. They scripts differ fr...
Same Goal
Other guides in Configure auto-update settings for Visual Studio Code extensionsSee settings that are in the same category as this guide.
Using other actions in the same category may help you achieve your goal better.
About the Creators
These people have authored this documentation and written its scripts:
Reviewed By
This guide has undergone comprehensive auditing and peer review:Expert review by undergroundwires
- Verified technical accuracy and editorial standards
- Assessed system impact and user privacy risks
Public review by large community
- Privacy enthusiasts and professionals peer-reviewed
- Millions of end-users tested across different environments
History
We continually monitor our guides, their impact and all other privacy options. We update our guides when new information becomes available. On every update, we publicly store who made the change, what has been changed, why the change was made and when the change was made.