Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# Make every deb line a comment, this should disable the microsoft repository referenced in vscode.list
sed -i -e 's/^deb/# deb/' /etc/apt/sources.list.d/vscode.list
# Remove the microsoft gpg key and replace with an empty file
rm /etc/apt/trusted.gpg.d/microsoft.gpg && touch /etc/apt/trusted.gpg.d/microsoft.gpg
# Mark files as immutable to avoid changes from updates
chattr +i /etc/apt/trusted.gpg.d/microsoft.gpg
chattr +i /etc/apt/sources.list.d/vscode.list
# Add entry to hosts file to hide
echo '# Disable' >> /etc/hosts
echo '' >> /etc/hosts
# Check files, check regulary that telemetry is still disabled
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment