You create a swatch library by saving the
current document as a swatch library.
Edit
the swatches in the Swatches panel so that it contains only the
swatches you want in the swatch library.
Select Save Swatch Library from the Swatches panel menu.
To remove all swatches that aren’t used
in the document, choose Select All Unused from the Swatches panel
menu, and then click the Delete Swatch button .