Unlock locked folder in OS X

An issue came up where there was a locked directory on the desktop of a Mac running OS X 10.4. I couldn’t delete it from the terminal either. Here is the way to change the attributes so you can delete (or move to trash) it successfully.

  1. Open Terminal (/Applications/Utilities).
  2. Type this, followed by a space: sudo chflags -R nouchg
  3. Drag the folder you would like to unlock into the Terminal window.
  4. Press Return.

link