How to remove cuda-documentation-10-2 and cuda-samples-10-2 and keep nvcc installed?

I use the following two command to remove cuda-documentation-10-2 and cuda-samples-10-2.
apt-get -y purge cuda-documentation-10-2
apt-get -y purge cuda-samples-10-2

But nvcc has been removed after running above two commands. How to remove cuda-documentation-10-2 and cuda-samples-10-2 and keep nvcc installed?