# apt list --installed | grep mongodb
mongodb-org/stretch,now 4.2.1 amd64 [installed]
mongodb-org-mongos/stretch,now 4.2.1 amd64 [installed,automatic]
mongodb-org-server/stretch,now 4.2.1 amd64 [installed,automatic]
mongodb-org-shell/stretch,now 4.2.1 amd64 [installed,automatic]
mongodb-org-tools/stretch,now 4.2.1 amd64 [installed,automatic]
W przypadku braku instalacji należy ściągnąć pakiety
# wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add -
Dla Debian9 (stretch)
# echo "deb https://repo.mongodb.org/apt/debian stretch/mongodb-org/4.2 main" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list
# apt-get update
# apt-get install -y mongodb-org