This article demonstrates how to uninstall the Intune app for Linux. The commands for removing the Microsoft Intune portal app for Linux differ depending on whether you are using Ubuntu desktop or Red Hat. Both of the approaches will be covered in this guide.

Enrolling a Linux device in Microsoft Intune gives the device secure access to work or school resources via Microsoft Edge. In our guide to enrolling Linux devices in Intune, we explained how to install the Intune app for Linux using a set of commands.

If the Intune portal app on your Linux device is crashing or has got errors during its launch, you can simply uninstall it. If you’ve made up your mind to unenroll your Linux device from Intune, the company portal app must be removed from the device.

Install and Update Third Party Applications with Patch My PC
Install and Update Third Party Applications with Patch My PC

Note that removing the portal app from Linux will end all communications with Microsoft Intune. Unlike the company portal app for Windows, the Intune app for Linux requires a few commands to be cleanly removed. Let’s see how you can achieve that.

Prerequisites

The following prerequisites are required to uninstall the Intune app for Linux:

  1. Intune portal app removal can be done only on supported Linux distros, which include RHEL 8, 9 and Ubuntu Desktop 22.04 and 20.04 LTS versions.
  2. You need root privileges to remove software on Linux. To gain these permissions, you can use the sudo command and enter your user password.

The steps below follow Microsoft’s instructions for uninstalling the Intune Linux app from a personal computer. If you encounter any issues while executing these commands, do let us know via the support options provided at the end of this article.

Uninstall Intune app from Ubuntu Desktop

If your enrolled devices are running Ubuntu Desktop 22.04 or 20.04 LTS, the following commands should be used to remove the Intune app.

Remove the Intune portal package

Run the below command to remove the Intune portal package from Ubuntu Desktop. You’ll have to enter the superuser password here for app removal.

sudo apt remove intune-portal
Uninstall Intune app for Linux - Ubuntu Desktop
Uninstall Intune app for Linux | Ubuntu Desktop

After executing the above command, the Intune app is removed from the Ubuntu desktop. The below lines confirm the same.

The following packages will be REMOVED:
  intune-portal
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 28.4 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 200997 files and directories currently installed.)
Removing intune-portal (1.2405.17-jammy) ...
Current systemd version does not support automated reload of user units, please run 'systemctl --user daemon-reload as your user or reboot the machine.
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ..

Clear the local registration data

Next, run the below command to completely remove the local registration data from your Linux device. This command removes the updated local configuration data that contains your device registration.

sudo apt purge intune-portal

The Intune app removal from Ubuntu desktop doesn’t require a system reboot but we recommend doing so.

Uninstall Intune app for Linux - Ubuntu Desktop
Uninstall Intune app for Linux | Ubuntu Desktop

Uninstall Intune app from RedHat Enterprise Linux

Run the following commands to uninstall the Microsoft Intune app and remove local registration data on devices running RedHat Enterprise Linux.

sudo dnf remove intune-portal

Next, run the below commands in order to remove the local registration data from your RHEL device. You may reboot the machine after the app removal is successfully done.

sudo rm -rf /var/opt/microsoft/mdatp
sudo rm -rf /etc/opt/microsoft/mdatp
sudo rm -rf /opt/microsoft/mdatp

Still Need Help?

If you need further assistance on the above article or want to discuss other technical issues, check out some of these options.

Prajwal Desai

Prajwal Desai is a technology expert and 10 time Dual Microsoft MVP (Most Valuable Professional) with a focus on Microsoft Intune, SCCM, Windows 365, Enterprise Mobility, and Windows. He is a renowned author, speaker, & community leader, known for sharing his expertise & knowledge through his blog, YouTube, conferences, webinars etc.