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,<
The App Store app does not account for the purgeable space. I have filed a feedback on this issue some weeks ago to the Apple Feedback Program: it seems fixed since macOS Catalina, as now it works without workaround.
For previous MacOS see this answer