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.
- Open Terminal (/Applications/Utilities).
- Type this, followed by a space: sudo chflags -R nouchg
- Drag the folder you would like to unlock into the Terminal window.
- Press Return.