Anomalies can be elegantly analyzed by means of the Dai-Freed theorem. In this framework it is natural to consider a refinement of traditional anomaly cancellation conditions, which sometimes leads to nontrivial extra constraints in the fermion spectrum. We analyze these more refined anomaly cancellation conditions in a variety of theories of physical interest, including the Standard Model and the $SU(5)$ and $Spin(10)$ GUTs, which we find to be anomaly free. Turning to discrete symmetries, we find that baryon triality has a $\mathbb{Z}_9$ anomaly that only cancels if the number of generations is a multiple of 3. Assuming the existence of certain anomaly-free $\mathbb{Z}_4$ symmetry we relate the fact that there are 16 fermions per generati...