def unlink_tracker(tracker, oauth_only=False):
    tracker.oauth_access_token = None
    tracker.oauth_refresh_token = None
    tracker.oauth_expires_at = None
    tracker.oauth_expires_in = None

    if not oauth_only:
        tracker.fitbit_user = None
        tracker.tracker_count = 0
        tracker.battery_status = tracker.DEFAULT_BATTERY_STATUS
        tracker.last_sync = None
        tracker.last_checked = None
        tracker.timezone = None
