TES4Edit has a "Clean masters" function, which will remove all unneeded master files from a plugin. It won't remove the master if your mod edits or references a record from it. TES4Gecko, I think, can forcefully remove any master, but doing so can create errors in esp file, if that master was referenced.