Overview
That instruction dedicated updating process of the MongoDB when you have trouble with current version, exist needs to installation compatible version, commonly update software or any else reason. We consider several ways, which help to update system software and freeze version of using software!
Installation
For avoid problem with library package and older utility we have to update system packages through apt manager:
After process was finished without problem, we can check installed version of the DBMS for make next step more clearness:
In the display you can see version at the right side of the package name, on the official site we can choose any else version of package and remember numerical record.
Also don't forget to backup all your database, we consider way to save DB for community edition take it in mind!
That command help to save indicated DB for dedicated user in the current directory where user was actived!
Now we consider way installation through purge, type in the CLI command below:
The purge option delete all dependencies of the package and record mongodb-org with sign * at the end indicate all bounded package with that. On the system stay only log and library, we can delete them by the command:
rm -rf /var/lib/mongodb
After that we can indicate needed version of the installation package, in that case you need to specify all entity, because of in another way only indicated version on the package will be updated:
For avoid problem with accidental update package on the newer version when you want to save yours, use command below:
That action you need to do with every installed package! And that's it, we are update our packages! If you have troubles with starting daemon, than try to make sure that work correctly with systemctl:
Than if you see dead process start it, by the command:
That can help to troubleshoot your issue with daemon and start unloaded service.
The updating process for MongoDB becomes essential in scenarios where issues arise with the current version, necessitating the installation of a compatible version, routine software updates, or other reasons.