Remove unrelated cfgs.