We consider local (or perturbative) gauge anomalies in models which extend the rank of the Standard Model (SM) gauge group and the chiral fermion content only by $n$ SM singlets. We give a general solution to the anomaly cancellation conditions (ACCs) of an additional $U(1)$ subgroup for the ACCs that involve only SM fermions and we examine whether a corresponding solution exists for the remaining ACCs. We show that a solution to the remaining ACCs always exists for $n geq 5$ in the family non-universal case or $n geq 3$ in the family-universal case. In the special case where only a single family carries non-vanishing charges, we find a general solution to all ACCs, for any value of $n$.