AppArmor is a great tool to secure and protect your Ubuntu and Debian systems. It could, however, be a little bit restrictive and cause unnecessary problems in some situations.
systemd manages AppArmor in Ubuntu and Debian. You can stop AppArmor service and disable AppArmor from starting during system boot using systemd. You can also remove or uninstall AppArmor from your system using apt.
It is not recommended to remove AppArmor in production systems. Only remove it in a development environment or desktop, whenever necessary.
Steps to disable and remove AppArmor in Ubuntu and Debian:
- Open your preferred terminal application.
- Stop apparmor service using systemd.
$ sudo systemctl stop apparmor
- Disable apparmor from starting on system boot.
$ sudo systemctl disable apparmor Synchronizing state of apparmor.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install disable apparmor
- Remove apparmor package and dependencies using apt (optional).
$ sudo apt remove --assume-yes --purge apparmor Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: apparmor* snapd* 0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded. After this operation, 122 MB disk space will be freed. ##### snipped
This will also remove snapd. Only proceed if you don't use snapd to manage your packages. Reinstalling snapd will also install AppArmor as dependency.
Comment anonymously. Login not required.