  We consider the generalized Jacobian $\widetilde{J}$ of the modular curve
$X_0(N)$ of level $N$ with respect to a reduced divisor consisting of all
cusps. Supposing $N$ is square free, we explicitly determine the structure of
the $\mathbb{Q}$-rational torsion points on $\widetilde{J}$ up to $6$-primary
torsion. The result turns out to be very different from the case of prime power
level previously studied by Yang and the second author. We also obtain an
analogous result for Drinfeld modular curves. Our proof relies on similar
results for classical Jacobians due to Ohta, Papikian and the first author. We
also discuss the Hecke action on $\widetilde{J}$ and its Eisenstein property.
