To return to your home country prepare to close down your San Francisco household as previously discussed in "Before the Departure".
Also prepare your goods to go through customs by making a detailed inventory and secure a proof of change of residence so you may go through customs easier.
To have the lowest taxes you will need to have had a residence abroad for more than 12 months and have had use of the possessions in a private capacity for at least 6 months.