install MongoDB4.4 on Ubuntu 20.04

I came across some challenge in update apt, I could solve it using below steps. Hope this helps somone.

Step 1 to remove old installation if any!

sudo apt remove — autoremove mongodb-org

step 2 remove any mongo repo list

sudo rm /etc/apt/sources.list.d/mongodb*.list

step 3 update apt

sudo apt update

step 4 Now add the new Key

sudo apt-key adv --keyserver hkp:// --recv 656408E390CFB1F5

step 5 add the new repository

echo "deb [arch=amd64] $(lsb_release -sc)/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org.list

step 6 update the apt

sudo apt update

Step 7 here you go

sudo apt install mongodb-org

step 8 enable and start

systemctl enable mongod.service
systemctl start mongod.service

check mongo — version.

Hope this helps someone!