Remove irrelevant part of command.