Unable to install Cuda 10.2

Hello,

I am trying to install CUDA 10.2 in a ubuntu 18.04 system. I am following these following commands below:

But, it initiates downloading CUDA 11.0. Is there a way to forcefully install CUDA 10.2 or 10.2 in my system?

Thank you.

There is a problem in the last command: “sudo apt -y install cuda”

use

“sudo apt -y install cuda-10-2” instead.