We study regularity of a conjugacy between a hyperbolic or partially hyperbolic toral automorphism $L$ and a $C^{\infty }$ diffeomorphism $f$ of the torus. For a very weakly irreducible hyperbolic automorphism $L$ we show that any $C^{1}$ conjugacy is $C^{\infty }$ . For a very weakly irreducible ergodic partially hyperbolic automorphism $L$ we show that any $C^{1+\text{H\"{o}lder}}$ conjugacy is $C^{\infty }$ . As a corollary, we improve regularity of the conjugacy to $C^{\infty }$ in prior local and global rigidity results.