In today’s article, we’re going to learn how to remove AppArmor from Ubuntu. This will work for other distros, like Debian. It’s actually not a very difficult task to remove AppArmor from Ubuntu, but it’s not something you necessarily want to do. Just because you can, doesn’t mean you should…
As many of you know, I write many of these articles based on the notes I’ve taken over the years. I’m a little reluctant to write this one, because removing AppArmor is probably not the best of choices.
AppArmor is similar to the various jails and application isolation techniques. It’s a security tool that restricts applications to a constrained set of resources. If the application is then compromised, it only has access to that set of resources and not to the whole system.
In other words, unless you know what you’re doing, you almost certainly don’t want to remove AppArmor from Ubuntu. In fact, if you don’t know what you’re doing then doing this is almost certainly a ‘not-bright’ choice.
If you’re going to remove AppArmor, you should consider replacing it with something else. SELinux is an option that’s similar, though I suppose you could use something like Firejail and be prepared to craft your own application profiles.
Again, removing AppArmor from Ubuntu (or whatever distro you’re using that has it) is probably not a good idea. I include the article because the information is already out there and because some folks may just decide to operate their system without such protections. This is Linux, you have the freedom to make bad choices. This isn’t even the first time I’ve shown you how to make bad choices.
Remove AppArmor From Ubuntu:
Like oh so many of these articles, you’re gonna need an open terminal. Just press
We should first check to ensure AppArmor exists and is running. To do so, enter the following command:
What you’re looking for is several lines into the output. You’re looking for ‘
apparmor module is loaded‘. If you see that, AppArmor both exists and is running. So, the next step in removing AppArmor is to stop the service. You do that with:
sudo systemctl stop apparmor
In case AppArmor is somehow installed again, we’ll make sure that it won’t start at boot by disabling the service entirely. That seems like a good idea.
sudo systemctl disable apparmor
Finally, we nuke AppArmor from existence with a purge command:
sudo apt purge apparmor
And that should do it. You probably want to reboot, just to make sure there are no tendrils sticking around – but stopping the service first should mean you don’t need to. Either way, you have now removed AppArmor from your system – assuming you followed the directions.
Again, and I can’t stress this enough, don’t do this unless you know what you’re doing and unless you have something to replace AppArmor with. It’s really a bad idea and you’ll gain very little. I wouldn’t even do this with a system air-gapped from the network, unless I had a very good reason to do so.
Thanks for reading! If you want to help, or if the site has helped you, you can donate, register to help, write an article, or buy inexpensive hosting to start your own site. If you scroll down, you can sign up for the newsletter, vote for the article, and comment.
Last Updated on June 19, 2022 by KGIII
4 thoughts on “How To: Remove AppArmor From Ubuntu”
Apparmor does nothing for small business and home users. It interferes with almost any hardware including serial ports. Its like having antivirus programs on you computer. Its generates profits but does little for the user. Today, cable modems and wifi routers have more capabities than anti virus software. Sadly, users in the US have remained iliterate when it comes to computer breaches, viruses, and malicious software. Not opening suspicious emails or emails from senders they don’t know eliminates almost 100% of viruses. A properly setup router can eliminate the remaining threats if properly configured.
App armor was stuck into Linux by people who wanted to add a marketing feature for municipalities and big business. It is questionable if it has ever reduced any threats but it has certainly cost millions in chasing non existant hardware problems.
While I do not agree with your assessment in principle or in theory, I will absolutely allow your comment to be published.
I do agree that antivirus software is a waste of resources. Even in my Windows days, I went years without any resident antivirus. I was behind a firewall, however.
Apparmor is stopping me from loading new brushes into Gimp. It’s a flaming nuisance .
That’s odd. That’s very odd.
I don’t think it should do that…
Did you install GIMP as a Snap application perhaps?