As Richard has mentioned, best way is with a press. The little 12t unit i have didnt budge any but the 40t gets them easily, they are in there fairly tight. And they can be tight to get back in also.
If you are going to be taking the entire hub off, and you unbolt it from the wishbone setup. Just watch the bearings where it connects to the wishbone. It might pay to replace them at the same time if you havent done already, parts for both those sides should set you back around $50, don't go to nissan though as the seals cost $98 i purchased mine through the local bearing shop