This a simple mod which prevents the game from spawning townie neighbours when you play an apartment complex with one or more vacant apartments. With this mod installed, the extra apartments will stay vacant, unless you decide to move a playable family into them. This is useful if, like me, you're a complete control freak playing an isolated village where every sim must be a playable, and even seeing the dang garden club member and mailwoman makes your brain start ticking over ways to eliminate them.
Bear in mind that you can only move four families into an apartment complex. This means that if you have an apartment complex with more than four apartments, the leftover apartments will be permanently empty.
The mod simply modifies the Apartments - NPC Management BHAV to always return false when asked if there is an empty apartment which needs to be filled. Conflicts are unlikely, but possible. This mod does not interfere with the roommate search function. To get your apartments spawning neighbours again, simply remove the mod from your Downloads folder.
Should work with any configuration which includes AL, but I haven't tested all EP configurations (because AGS hates me), so please do report any problems.