rm: /var/empty: Operation not permitted

I was trying to remove a folder at /var/empty with no success (Operation not permitted):

ls -al
dr-xr-xr-x  2 root     wheel     512B Jul 18  2010 empty
sudo rm -Rf empty
rm: /var/empty: Operation not permitted

So I decided to change the permission:

sudo chmod a+rw empty/

and it did not work either:

chmod: empty/: Operation not permitted

Finally, I gave chflags a try:

chflags -R noschg empty/
sudo rm -Rf empty/



Our sponsors:

One Reply to “rm: /var/empty: Operation not permitted”

Leave a Reply

Your email address will not be published. Required fields are marked *