Try installing any other small app in the App Store and then install Xcode. It worked for me. In my case, I had 40 GB empty space but could not install Xcode due to the same error. Deleting ~/Library/Caches/storedownloadd did not work for me either.
Try installing any other small app in the App Store and then install Xcode. It worked for me. In my case, I had 40 GB empty space but could not install Xcode due to the same error. Deleting ~/Library/Caches/storedownloadd did not work for me either.