From my Notebook >
Here’s the error message:
E: /var/cache/apt/archives/libdb5.3_5.3.28-11ubuntu0.1_amd64.deb: unable to remove obsolete info file '/var/lib/dpkg/info/libdb5.3:amd64.postinst': Operation not permitted
This prevents us from installing software! That sucks. We try rm -rf with that file but can’t remove it. Let’s look at the attributes of the other files in this folder:
We see that most files in this folder simply have an ‘e’ attribute. Now let’s look at the attributes of the file in question.
See that it’s the only file in the folder with an ‘a’ attribute;
remove a attribute:
sudo chattr -a /var/lib/dpkg/info/libdb5.3:amd64.postinst
Now let’s try deleting the file:
sudo rm -rf /var/lib/dpkg/info/libdb5.3:amd64.postinst
Done! It worked. Good luck.