git clone https://github.com/belotserkovtsev/remove-derived-data.git
cd remove-derived-data
make
git clone https://github.com/belotserkovtsev/remove-derived-data.git
chmod u+x <script-name>
echo "source <dir-where-the-script-is>/remove_derived_data.sh" >> $(HOME)/.bash_profile
Simply run the command:
rdd
> Successfully flushed DerivedData
> Restart XCode safely? [y/n] - y