It is known that A-paths of length 0 mod m satisfy the Erdős-Pósa property if m=2 or m=4, but not if m>4 is composite. We show that if p is prime, then A-paths of length 0 mod p satisfy the Erdős-Pósa property. More generally, in the framework of undirected group-labelled graphs, we characterize the abelian groups Γ and elements ℓ∈Γ for which the Erdős-Pósa property holds for A-paths of weight ℓ.