You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### How to uninstall Microsoft Defender for Endpoint on Linux Servers
225
225
226
-
Create uninstallation YAML file (for example: /etc/ansible/playbooks/uninstall_mdatp.yml) which uses mde_installer.sh. You can also download the file directly from [GitHub](/defender-endpoint/linux-support-events)
226
+
First, create an uninstallation YAML file (for example: /etc/ansible/playbooks/uninstall_mdatp.yml) which uses `mde_installer.sh`. You can also download the file directly from [GitHub](/defender-endpoint/linux-support-events)
227
227
228
228
```bash
229
229
@@ -261,188 +261,191 @@ Follow the steps in this section after downloading the onboarding package and me
261
261
262
262
Create a subtask or role files that contribute to a playbook or task.
263
263
264
-
- Create the onboarding task, `onboarding_setup.yml`:
264
+
1. Create the onboarding task, `onboarding_setup.yml`:
265
265
266
-
```bash
267
-
- name: Create MDATP directories
268
-
file:
269
-
path: /etc/opt/microsoft/mdatp/
270
-
recurse: true
271
-
state: directory
272
-
mode: 0755
273
-
owner: root
274
-
group: root
275
-
276
-
- name: Register mdatp_onboard.json
277
-
stat:
278
-
path: /etc/opt/microsoft/mdatp/mdatp_onboard.json
279
-
register: mdatp_onboard
280
-
281
-
- name: Extract WindowsDefenderATPOnboardingPackage.zip into /etc/opt/microsoft/mdatp
282
-
unarchive:
283
-
src: WindowsDefenderATPOnboardingPackage.zip
284
-
dest: /etc/opt/microsoft/mdatp
285
-
mode: 0600
286
-
owner: root
287
-
group: root
288
-
when: not mdatp_onboard.stat.exists
289
-
```
266
+
```bash
267
+
- name: Create MDATP directories
268
+
file:
269
+
path: /etc/opt/microsoft/mdatp/
270
+
recurse: true
271
+
state: directory
272
+
mode: 0755
273
+
owner: root
274
+
group: root
275
+
276
+
- name: Register mdatp_onboard.json
277
+
stat:
278
+
path: /etc/opt/microsoft/mdatp/mdatp_onboard.json
279
+
register: mdatp_onboard
280
+
281
+
- name: Extract WindowsDefenderATPOnboardingPackage.zip into /etc/opt/microsoft/mdatp
282
+
unarchive:
283
+
src: WindowsDefenderATPOnboardingPackage.zip
284
+
dest: /etc/opt/microsoft/mdatp
285
+
mode: 0600
286
+
owner: root
287
+
group: root
288
+
when: not mdatp_onboard.stat.exists
289
+
```
290
+
291
+
2. Add the Defender for Endpoint repository and the key, `add_apt_repo.yml`. Defender for Endpoint on Linux can be deployed from one of the following channels:
292
+
293
+
- *insiders-fast*, denoted as `[channel]`
294
+
*insiders-slow*, denoted as `[channel]`
295
+
- *prod*, denoted as `[channel]` using the version name (see [Linux Software Repository for Microsoft Products](/linux/packages))
296
+
297
+
Each channel corresponds to a Linux software repository.
290
298
291
-
- Add the Defender for Endpoint repository and key, `add_apt_repo.yml`:
292
-
293
-
Defender for Endpoint on Linux can be deployed from one of the following channels:
294
-
- *insiders-fast*, denoted as `[channel]`
295
-
- *insiders-slow*, denoted as `[channel]`
296
-
- *prod*, denoted as `[channel]` using the version name (see [Linux Software Repository for Microsoft Products](/linux/packages))
297
-
298
-
Each channel corresponds to a Linux software repository.
299
-
300
-
The choice of the channel determines the type and frequency of updates that are offered to your device. Devices in*insiders-fast* are the first ones to receive updates and new features, followed later by *insiders-slow*, and lastly by *prod*.
301
-
302
-
303
-
In order to preview new features and provide early feedback, it's recommended that you configure some devices in your enterprise to use either *insiders-fast* or *insiders-slow*.
304
-
305
-
> [!WARNING]
306
-
> Switching the channel after the initial installation requires the product to be reinstalled. To switch the product channel: uninstall the existing package, re-configure your device to use the new channel, and follow the steps in this document to install the package from the new location.
307
-
308
-
Note your distribution and version and identify the closest entry for it under `https://packages.microsoft.com/config/[distro]/`.
309
-
310
-
In the following commands, replace *[distro]* and *[version]* with the information you've identified.
311
-
312
-
> [!NOTE]
313
-
> In case of Oracle Linux and Amazon Linux 2, replace *[distro]* with "rhel". For Amazon Linux 2, replace *[version]* with "7". For Oracle Linux, replace *[version]* with the version of Oracle Linux.
- Create the Ansible install and uninstall YAML files.
348
-
349
-
- For apt-based distributions, use the following YAML file:
350
-
351
-
```bash
352
-
cat install_mdatp.yml
353
-
```
354
-
```Output
355
-
- hosts: servers
356
-
tasks:
357
-
- name: include onboarding tasks
358
-
import_tasks:
359
-
file: ../roles/onboarding_setup.yml
360
-
- name: add apt repository
361
-
import_tasks:
362
-
file: ../roles/add_apt_repo.yml
363
-
- name: Install MDATP
364
-
apt:
365
-
name: mdatp
366
-
state: latest
367
-
update_cache: yes
368
-
```
369
-
370
-
```bash
371
-
cat uninstall_mdatp.yml
372
-
```
373
-
```Output
374
-
- hosts: servers
375
-
tasks:
376
-
- name: Uninstall MDATP
377
-
apt:
378
-
name: mdatp
379
-
state: absent
380
-
```
381
-
382
-
- For dnf-based distributions, use the following YAML file:
383
-
384
-
```bash
385
-
cat install_mdatp_dnf.yml
386
-
```
387
-
```Output
388
-
- hosts: servers
389
-
tasks:
390
-
- name: include onboarding tasks
391
-
import_tasks:
392
-
file: ../roles/onboarding_setup.yml
393
-
- name: add apt repository
394
-
import_tasks:
395
-
file: ../roles/add_yum_repo.yml
396
-
- name: Install MDATP
397
-
dnf:
398
-
name: mdatp
399
-
state: latest
400
-
enablerepo: packages-microsoft-[channel]
401
-
```
402
-
403
-
```bash
404
-
cat uninstall_mdatp_dnf.yml
405
-
```
406
-
```Output
407
-
- hosts: servers
408
-
tasks:
409
-
- name: Uninstall MDATP
410
-
dnf:
411
-
name: mdatp
412
-
state: absent
413
-
```
299
+
The choice of the channel determines the type and frequency of updates that are offered to your device. Devices in*insiders-fast* are the first ones to receive updates and new features, followed later by *insiders-slow*, and lastly by *prod*.
300
+
301
+
In order to preview new features and provide early feedback, it's recommended that you configure some devices in your enterprise to use either *insiders-fast* or *insiders-slow*.
302
+
303
+
> [!WARNING]
304
+
> Switching the channel after the initial installation requires the product to be reinstalled. To switch the product channel: uninstall the existing package, re-configure your device to use the new channel, and follow the steps in this document to install the package from the new location.
305
+
306
+
3. Note your distribution and version and identify the closest entry for it under `https://packages.microsoft.com/config/[distro]/`.
307
+
308
+
4. In the following commands, replace *[distro]* and *[version]* with the information you've identified.
309
+
310
+
> [!NOTE]
311
+
> In case of Oracle Linux and Amazon Linux 2, replace *[distro]* with "rhel". For Amazon Linux 2, replace *[version]* with "7". For Oracle Linux, replace *[version]* with the version of Oracle Linux.
> When the product starts for the first time, it downloads the latest antimalware definitions. Depending on your Internet connection, this can take up to a few minutes.
427
+
> [!IMPORTANT]
428
+
> When the product starts for the first time, it downloads the latest antimalware definitions. Depending on your Internet connection, this can take up to a few minutes.
1. For information on how to find the log that's generated automatically when an installation error occurs, see [Log installation issues](linux-resources.md#log-installation-issues).
448
451
@@ -470,13 +473,9 @@ When upgrading your operating system to a new major version, you must first unin
470
473
## See also
471
474
472
475
- [Add or remove YUM repositories](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/yum_repository_module.html)
473
-
474
476
- [Manage packages with the dnf package manager](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/dnf_module.html)
475
-
476
477
- [Add and remove APT repositories](https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_repository_module.html)
0 commit comments