We study the pointed or copointed liftings of Nichols algebras associated to affine racks and constant cocycles for any finite group admitting a principal YD-realization of these racks. In the copointed case we complete the classification for the six affine racks whose Nichols algebra is known to be of finite dimension. In the pointed case our method allows us to finish four of them. In all of the cases the Hopf algebras obtained turn out to be cocycle deformations of their associated graded Hopf algebras. All of them are new examples of finitedimensional copointed or pointed Hopf algebras over non-abelian groups.2010 Mathematics Subject Classification. 16T05. This work was partially supported by ANPCyT-FONCyT, CONICET, MinCyT (Córdoba) and Secyt (UNC). Part of the work of A.G.I. was done as a fellow of the Erasmus Mundus programme of the EU in the Università degli Studi di Padova.1 As racks (F3, 2) ≃ O 3 2 , (F5, 2) * ≃ (F5, 3) and (F7, 3) * ≃ (F7, 5