Sometimes it can be done, but all depends on the setup. Why are you replacing the shaft? When working on spindles I like to remove the entire assembly to inspect all parts. When replacing the shaft, most times I recommend replacing the bearings at the same time.