I just installed apparmor to fresh ubuntu from original iso. After that I tried to delete it whats leads to disappearing of all applications like AppCenter and Firefox browser. Is it possible to delete apparmor without issues? How to do it correctly to not broke the system?
P.S. After deletion I tryed to reinstall AppCenter with “sudo snap install snap-store” next I installed Firefox and
tryed to launch it and got next error in terminal. Firefox installed with “apt install Firefox” works correctly. So what actually happened with my Ubuntu?
Can you elaborate ? What exactly did you install and how (and why) ?
Apparmor is a central and essential part of Ubuntu and one that all applications are hooked into.
It is enabled by default in the kernel and the userspace tools are pre-installed in all Ubuntu installations (there is usually no need to install it and it is not expected that you would remove it, if you wanted to disable it (not recommended) you would turn off the kernel feature via a boot option).
I used “sudo apt install apparmor apparmor-utils apparmor-profiles” to install it.
So I doing it cause I wana use apparmor but It’s annoying that I can’t delete it, so I’m trying to figure it out how it works and how to delete it if I wish
I jyst reinstall Ubuntu again and tried to launch “aa-status” and that works but “aa-genprof” not found So how it supposed to work? What is right workflow for me? Does it means apparmor is part of ubuntu we should’t remove?
ogra@styx:~$ aa-genprof
Command 'aa-genprof' not found, but can be installed with:
sudo apt install apparmor-utils
ogra@styx:~$
It should have suggested the right package …
Note, as i already said, apparmor is already used, profiles are generated and shipped in various packages so the utils are not actually needed unless you are a developer or need to manually modify things if you know what you are doing …
To remove the utils again when you installed them manually, you can indeed just apt remove apparmor-utils but you can not remove the apparmor or libapparmor packages themselves since they are part of every ubuntu install and packages using apparmor depend on them (and apt should have told you in a message that they were already installed when you called the command you mentioned)’
What do you plan to do with the aa-genprof command , using it as a normal user is something I wouldn’t recommend if you do not actually have a specific use for it and know what to do with it …
Does it generate profiles automatically when some app installed even for applications from custom sources?
To make it clear I wanna restrict UnityHub and Unity Editors
Packages in the archive often already ship apparmor profiles they drop into /etc/apparmor.d and the apparmor package itself also ships quite a few already …
You can indeed use aa-genprof for packages that do not do that or for third party stuff you i.e. compile from source or install from elsewhere … and for that aa-genprof can be used but it isn’t something normal users do need/use typically which is why the apparmor-utils package is not pre-installed.