Sure thing!
sudo apt-get remove nvidia-cuda-toolkit
sudo apt-get purge nvidia-cuda-toolkit
sudo apt-get purge --auto-remove nvidia-cuda-toolkit
After that, you can install Cuda11.1V in this link
Then, you could install Deepstream5.1 normally
Cheers,
JJ