Agree To Xcode License Command Line


With the newer versions of Xcode and iOS being released lately, you will undoubtedly be presented with the updated license agreement. Agreeing to it is mandatory and below I will show you how. So if you are not sure, read on.

Agree To Xcode License Command Line

Performing tasks on the command line in Terminal will cause you to continually be prompted to accept the license agreement like so

12:25pm @ darianbr:  xcodebuild

The prompt looks something like this

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Agree To Xcode License Command Line

Agree To Xcode License Requires Admin Privileges

Accepting the license will require admin privileges. Do so by running the xcodebuild command as sudo. You will be prompted to enter your password and you will be shown the Xcode license agreement.

12:26pm @ darianbr: sudo xcodebuild

You will be prompted to etner your password and will be shown the license agreement.


You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.

Hit the Enter key to view the license agreements at '/Applications/'

Accepting the Xcode License Agreement

At the end of the license agreement, as show below, you will need to type ‘accept’ (I highlighted in yellow) in order to accept the xcode licence agreement.

5. Services; Mac Developer Program.
A. Apple may provide access to services by or through the Developer Software for you to use.  Use of these services may require an Apple ID, may require you to accept additional terms and may be subject to additional fees. If you elect to use such services in conjunction with the Developer Software, your usage of such services will be subject to those additional terms and conditions (e.g., your use of Developer IDs obtained from your Apple Developer Program account will be subject to the applicable Apple Developer Program terms for Developer IDs), but this License will continue to apply to your use of the Developer Software licensed hereunder. If you would like to submit Applications you develop to the Mac App Store, then you must apply to join the Mac Developer Program. More information about Appleā€™s Developer Programs is available at Apple reserves the right to refuse admission to any of its 

By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel]

Final Words

After typing ‘accept’ and hitting enter, you will now have accepted the license agreement and will no longer be prompted to agree to xcode license agreement.