Utility to clean bad pins from database