I did it some time ago, so I do not remember exactly how I uninstalled Xcode. If there is no uninstall option in the App Store, I just move Xcode to the trash and delete it.
I was able to install the command line tools by:
- go to https://developer.apple.com
- to log in
- go to Account> Downloads> See more downloads
and there is an item called Command Line Tools (macOS 10.14) for XCode 10.2