I have Ubuntu 16.04 and lately I reinstalled AppArmor:

sudo rm -rf /etc/apparmor*
sudo apt-get install apparmor --reinstall
sudo service apparmor restart

When I am trying to parse a profile with apparmor_praser I got error:

AppArmor parser error for my.profile in my.profile at line 1: Could not open 'tunables/global'

I checked my ApprAmor folder and noticed it missing some files:

root@ubuntu:/etc/apparmor.d# ls ./tunables/
home.d  multiarch.d  xdg-user-dirs.d

While, before I removed the files I had these files:

root@ubuntu:~# ls /etc/apparmor.d/tunables/
alias  apparmorfs  dovecot  global  home  home.d  kernelvars  multiarch  multiarch.d  proc  securityfs  sys  xdg-user-dirs  xdg-user-dirs.d

It seems that the installation didn't install all the dependencies libraries.
I tried also these ones:

apt-get install apparmor-utils apparmor-easyprof apparmor-easyprof-ubuntu 

But I still don't have important files such as tunables/global.

Any idea how I can reinstall AppArmor as it came up with Ubuntu default installation ?

  • please don't rm -rf random files in /etc. Feb 1, 2019 at 6:40

1 Answer 1


I went to this place:


Inside this tar file I wend to ../profiles/apparmor.d and extracted all the content to /etc/apparmor.d by:

cp -r ./apparmor.d/ /etc/apparmor.d/  

But it weird that I needed to do it manually.
I will be glad if someone can share automatic way to do it with apt-get.

  • i had the same problem. i wish apparmor would just disappear. it's perhaps the most useless package for desktop that inserts itself everywhere and is impossible to remove
    – thang
    Apr 11, 2019 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.