How do you update Xcode on OSX to the latest version?
softwareupdate --list
see the list of outdated software.
softwareupdate --install --all
update all outdated software.
softwareupdate --install <product name>
update the software you named.
Open up App Store
Look in the top right for the updates section (may also be in lefthand column "Updates"..)
Find Xcode & click Update
Sometime I don't see the Xcode update in Updates tab
in AppStore
So I search Xcode in AppStore
Then click update and it update