...
Same procedure as projections here. Remove all SYMBOL definitions that are not used by your layers. Either define the symbols in the map file or reference an edited SYMBOLSET file. See the topic Configure MapServer Cartography for details.
Font Sets
Same procedure again. Identify which fonts are being used by your map file and remove unnecessary FONT definitions in the fonts.list. If you are not using any fonts then remove the FONTSET line.
...