Put even more NPC in your ship until its full. Then, when trying to enter this full ship you will be given the option to kick one NPC. The kicked NPC is random. Do that until you kicked all unwanted NPC.
The main difference is that this auto-kick-passenger feature allows 'adjacent' kicking, while the Kick Passenger function only allows you to kick passengers out into the container your ship is in (e.g. a planet, or a ship you're docked in). If you're not on a cap and can land, just go use the regular Kick Passenger function by flying to a non-hostile-atmo planet and Kick Passenger onto the terrain.
- That feature is not intended to let you kick anything onto adjacent entities, it's intended to let you get access to an entity you have rights to access (pilot, etc.) when it's full of other passengers. It resolves an otherwise unresolveable situation of someone getting crewlist once and filling your entities with passengers that you cannot eject or board to arrest in order to eject. That is, it's Necessary cause there's literally no other way to get on board an entity you own if it is full.
- The SimNews clarifies that Loading an entity for the purpose of kicking out a PC using the Kick Passenger function is expressly an exploit. Interpreting that as "it's not an exploit to do it to NPCs" is sophism.
Whether people would get Detected for doing it, or punished as severely as if done against a PC is not likely. That doesn't make it good advice to give or take.