> ## Content Index
> Fetch the complete content index at: https://developerinsider.co/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Clear Derived Data using Xcode Keyboard Shortcut?
- URL: https://developerinsider.co/how-to-clear-derived-data-using-xcode-keyboard-shortcut/
- Published: 2020-05-31T04:49:33.000Z
- Updated: 2020-12-05T11:10:39.000Z
- Author: Vineet Choudhary
- Tags: Xcode, iOS, Shortcut, Tips

Do you know, you can clear derived data from Xcode with a custom keyboard shortcut? First, Create a new script file somewhere in your system with following command -

```sh
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -frd ~/Library/Caches/com.apple.dt.Xcode/*

```

Now, open terminal and run `chmod +x Script.sh` to make the file executable. Now go to Xcode's Preferences and select the Behaviors tab. Click on the **+** sign to add a new custom behavior, and on the right hand side, check **Run** and choose the script that was just created.

Click the **⌘** symbol next to the behavior script name to set the keyboard shortcut. I use `⌃` \+ `⌘` \+ `D` for opening the Terminal. (Keyboard shortcut symbols - `⌘` \= Command key, `⌃` \= Control key, `⌥` \= Option (alt) key, `⇧` \= Shift key)

Here the demo video which cover all steps for similar script -