How do I remove Xcode from my MacBook without sudo?

On I installed Xcode on my school MacBook through the app store. But I can’t uninstall it because the applications folder is protected so I can no longer use git commands since I cant agree to the license because I do not have sudo permissions.

What can I do?

What I’ve tried so far.

  • I’ve tried running this command xcode-select --switch ~/no-xcode but it gives me this error xcode-select: error: invalid developer directory.
  • I have also tried to rm -rf it but I do not have permission to touch stuff in the application folder where Xcode is located.