Easy Steps To Disable and Remove AppArmor in Ubuntu

This guide will show you how to Disable and Remove AppArmor in Ubuntu. As you may know, AppArmor is a security module that helps you to protect your system. In some cases, it may cause problems and unnecessary issues. So you can disable or remove your AppArmor to fix your problems. You can follow the steps below to see how you can do it.

Note: You can also check this guide on AppArmor Configuration on Debian, to get more details about AppArmor.

How To Disable and Remove AppArmor in Ubuntu Linux?

Before you start, you must log in to your Ubuntu server as a non-root user with sudo privileges. In this article, to show you the guide steps we use Ubuntu 22.04. For this purpose, you can check the Ubuntu 22.04 Initial Setup Guide.

Then, follow the steps below to complete this guide.

Step 1 – Stop AppArmor Service From Terminal

By default, AppArmor is enabled on Ubuntu Linux. First, you must open a terminal and stop your AppArmor service on Ubuntu. To do this, you can run the command below:

sudo systemctl stop apparmor

Once you are done, proceed to the next step to disable your service.

Step 2 – Disable AppArmor Service From Terminal

At this point, you can easily use the following command to disable AppArmor on your server:

sudo systemctl disable apparmor

In your output, you will see:

Disable AppArmor Service From Terminal

Step 3 – Completely Remove AppArmor From Ubuntu Linux

If you plan to completely remove AppArmor with its dependencies, you can use the following apt command on your server:

sudo apt remove --assume-yes --purge apparmor

This will remove AppArmor and its dependencies completely:

Completely Remove AppArmor From Ubuntu Linux

Important Note: It will remove Snapd. If you use Snapd to manage your packages, do not remove AppArmor. Also, reinstalling Snapd will install AppArmor.

Conclusion

AppArmor will help you to protect your system by adding an extra security layer to your server. In some situations, it may cause some problems. So you can easily Disable and Remove AppArmor in Ubuntu. Hope you enjoy it.

Also, you may like to read the following articles:

Set up UFW GUI or GUFW on Ubuntu 22.04

Install and Use Metasploit on Ubuntu 22.04

Check and Install Security Updates on Ubuntu 22.04

Install and Use ClamAV on Ubuntu 22.04

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!