search available packages with keyword
$ apt-cache search <keyword>
list available versions of a package. For example, if I want to list all available versions for package libcudnn7
$ apt list -a libcudnn7
Before running this, running
apt update is recommended.
After finding a specific version that I want to install, then install the packge with a specific version like this
$ apt install libcudnn7=126.96.36.199-1+cuda10.1