In this paper, we establish a Kantorovich duality for unbalanced optimal total variation transport problems. As consequences, we recover a version of duality formula for partial optimal transports established by Caffarelli and McCann; and we also get another proof of Kantorovich–Rubinstein theorem for generalized Wasserstein distance $\widetilde {W}_1^{a,b}$ proved before by Piccoli and Rossi. Then we apply our duality formula to study generalized Wasserstein barycenters. We show the existence of these barycenters for measures with compact supports. Finally, we prove the consistency of our barycenters.