Convert a sawtooth with an offset to to an average voltage of 0
If you know that the input doesn't vary, that is, if it stays from 0 to 5V, then one solution would be a simple subtraction:



You can get the reference from the supply, if it's stable enough and it fits your needs. Otherwise, the highpass would have to have the cutoff at least a decade lower than the lowest harmonic (to not distort the sawtooth), and to be as linear as possible (1st order best), but even then it might vary in time with temperature and whatnot. Your choice, though.



Here are two reasons why I say a highpass is not the ideal choice:

1) you need a high time constant (or low cutoff frequency) in order not to distort the ramp. See the derivative of the waveform after the highpass with 10k\$\Omega\$ and stepped values of the cap of 10, 22, 47, and 100\$\mu\$F, that should have been, ideally, flat, and non-curved (traces are black 10, blue 22, red 47, green 100):



(note that they will never be prefectly flat as that would imply a zero cutoff frequency for the highpass, or, at the very least, a perfectly flat passband from the lowest harmonic upwards)

2) because of the above, here's the settling time for all the stepped values of the capacitor:





As a minor conclusion (and as @Harry Svensson suggests it): the cheapest solution is the highpass, but the price(s) to pay are, in my opinion, too great not to invest a little bit more and choose the proposed difference solution, which also brings the ability to control the level of the DC at the output, should there be a need for it.