President Donald Trump has moved to fire several officials soon after he was urged to purge staffers insufficiently committed to his agenda.