This is best done through RStudio which keeps everything up to date.
The old way is
For BioConductor packages,
This is the same command use to install a new package and its dependencies
More information on Bioconductor.
Install package from downloaded gz (make sure the file is in tar.gz format)
install.packages(“/path/package.tar.zip", repos=NULL, type="source")