I\'m using the Mac OS to install the XCode10.1.
I have 18.43GB free disk space in the mac,
but when I click the install button on the Xcode from the app store,<
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.
~/Library/Caches/storedownloadd