Un-removable /etc/resolv.conf

Solution 1:

For my case, is the immutable attribute of the file causing it. So do sudo chattr -a -i /etc/resolv.conf

Solution 2:

as per the help files (man chattr),

A  file  with the `a' attribute set can only be open in append mode for writing.

In your case the file has this attribute

The  operator  `+'  causes  the  selected attributes to be added to the
       existing attributes of the files; `-' causes them to  be  removed;

So the command to try would be

sudo chattr -a /etc/resolv.conf

and try listing the attributes once again using

lsattr /etc/resolv.conf

Then try deleting the file