Delete a User Code Snippet in Xcode

I did these steps :

  • Select needed code snippet and press Delete key.
  • A pop-up window will appear , and select Delete button.
  • Remember that : this action cannot be undone.

In the Library select the code snippet you want to delete and press Backspace. A confirm dialog will show up, click "Delete".


Good question, I haven't found a way to do it from within Xcode, but they can be deleted from the Finder. The snippets are stored at ~/Library/Developer/Xcode/UserData/CodeSnippets/. Each one is a separate file that you can delete. Unfortunately they're named with an ID and don't give an indication of which one is which. They're XML files though, so either use a text editor or QuickLook to see the contents and recognise them.

Also, I've had to restart Xcode in order to get the deleted snippets to no longer show up.


I was having trouble, and after messing around a bit it finally worked. You select the user snip and hit the delete key. I tried this multiple times but it didn't work initially. This may be due to me running a prerelease version of Xcode though.