Implement 'gc' command.