After updating my Macbook to the latest OSX version Catalina, the xcode package wasn’t able to update anymore. After spending some time, this solution worked for me:

  1. Remove the xcode package by dragging it from the Applications folder to Trash
  2. In the Terminal, paste these two commands:
    rm -rf ~/Library/Developer
    rm -rf ~/Library/Caches/
  3. Reboot your machine
  4. Reinstall xcode from the App Store