WelcomeUser Guide
ToSPrivacyCanary
DonateBugsLicense

©2025 Poal.co

544

Installing raspbian image on new pi4. First apt update could not reach a microsoft source.

Im so happy my router caught it, and blocked it (dnscrypt with lists of domains to block like pi hole).

Very suprised that it was allowed in the apt sources list from official image.

Installing raspbian image on new pi4. First apt update could not reach a microsoft source. Im so happy my router caught it, and blocked it (dnscrypt with lists of domains to block like pi hole). Very suprised that it was allowed in the apt sources list from official image.

(post is archived)

[–] 0 pt

Edit your /etc/hosts on RPI (or add that domain to your Pi-Hole) sudo nano /etc/hosts

Add the following line: 0.0.0.0 packages.microsoft.com

Save and close the file in vim. Put Debian package on hold so that it will not install further updates: sudo apt-mark hold raspberrypi-sys-mods

Delete Microsoft’s GPG key using the rm command: sudo rm -vf /etc/apt/trusted.gpg.d/microsoft.gpg

Make sure new keys cannot be installed: sudo touch /etc/apt/trusted.gpg.d/microsoft.gpg

Next, write protect that file on Linux using the chattr command: sudo chattr +i /etc/apt/trusted.gpg.d/microsoft.gpg lsattr /etc/apt/trusted.gpg.d/microsoft.gpg