Looking for code snippets to remove font families

I’m looking for code snippets that show how to remove specific font families from /Library/Fonts and ~/Library/Fonts. I’m assuming this should be done via Font Book, but feedback is welcome.