Issues installing Pytorch and CUDA

So i can safely remove the installed CUDA 9.1 from the computer and just install 1.8.1 and CUDA 10.2 / 11.1 (using pip) and work fine?