Raspberry Pi Raspbian OS gets a Microsoft repo without any notification: Here’s how to remove concerns of telemetry data collection

Raspberry Pi Raspbian OS Microsoft Repository
Raspbian OS gets Microsoft Repository in secret. Pic credit: Kritsada Jaiyen/Pixabay

Raspberry Pi received a silent addition last week. The most recent update to the most popular Single Board Computer (SBC) primary Operating System (OS) now has a Microsoft ‘apt’ repository by default.

Many Linux users, developers, and enthusiasts who tinker with the Raspberry Pi SBC are concerned about the Microsoft repo’s addition to Raspberry Pi OS with the latest update. What’s more troubling is the fact that the latest update adds a Microsoft apt repository to Raspbian OS without admin consent.

Raspberry Pi with Raspbian OS will “Ping” Microsoft servers and data will be collected?

The Raspbian OS is the default and most commonly used OS for the Raspberry Pi. It is the first OS that the SBC makers recommend users start with.

Hence, it is concerning to note that the Raspberry organization has included a Microsoft apt repository to the Raspbian OS without so much as an announcement or a blog post. The secrecy surrounding the development is disturbing, claim many users.

It seems the Pi foundation officially recommends MS IDE (Microsoft Integrated Development Environment). Hence, the organization apparently included the same inside the Raspberry Pi OS.

While this may seem harmless, there are several concerns about the inclusion:

  1. By using the forced Microsoft apt repository on my Raspberry Pi, Microsoft could indirectly control the software that people install. This is because when users will run an `apt install app,` they could get an app that Microsoft distributes or has modified.
  2. Hardcore Linux users would never want Microsoft or Raspberry Pi OS to install such a repo secretly.
  3. Microsoft may collect more info about Raspberry Pi and Linux users, and build a profile. This concern has driven many to try and reduce their digital footprint such as their IP address.
  4. Every ‘apt-get update’ command will pingback to the Microsoft repository. This is unacceptable to several in the Linux community
  5. If Raspberry Pi users or any of their family members are logged into the Microsoft ecosystem such as Github, Bing, Office/Live, the company could identify and track them when using the same shared public IP at home.

How to remove the Microsoft apt repository that was secretly added to Raspbian OS:

The simplest method to avoid the Microsoft apt repository is to stop using the default Raspbian OS. There are many capable operating systems for Raspberry Pi such as Arch Linux, Ubuntu, etc.

However, eliminating Raspbian OS is a bit difficult. This is because the OS is heavily optimized for the SBC. Hence, there is another method to eliminate the Microsoft apt repository.

Run the directive sudo nano /etc/hosts and add the following line: packages.microsoft.com

Now execute the following directives:

  • sudo apt-mark hold raspberrypi-sys-mods

  • sudo rm -vf /etc/apt/trusted.gpg.d/microsoft.gpg    #elimina la chiave GPG di Microsoft

  • sudo touch /etc/apt/trusted.gpg.d/microsoft.gpg     #crea file omonimo

  • sudo chattr +i /etc/apt/trusted.gpg.d/microsoft.gpg #lo proteggere da scrittura

  • sudo rm /etc/apt/sources.list.d/vscode.list

Executing the aforementioned commands should detach the Microsoft apt repository from the Raspbian OS.

The secrecy is certainly concerning. However, Microsoft has been quite open to Linux and its adoption. After years of fighting the Linux community, Microsoft has wholeheartedly embraced the open-source OS platform. In fact, Linux sessions outnumber Windows OS sessions on Microsoft Azure.

Notify of
Newest Most Voted
Inline Feedbacks
View all comments
1 year ago

sudo “remove”? What kind of command is that?

1 year ago

Great article, but ‘sudo remove …’ (last command) should be ‘sudo rm …’

Frank Plumacher
Frank Plumacher
1 year ago

There should be a class action law suite for this guy -SebastianBuza and/or the pi foundation. If an example is not made of this instance this will continue to happen. This is a big deal.

Would love your thoughts, please comment.x