Score:1

How do I remove old mongo tools?

in flag

I'm using Ubuntu 20.04 and trying to install latest mongodb

However I get this error:

➜  ~ 
$ sudo apt-get --purge remove mongodb-org
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 mongodb-org-tools : Depends: mongodb-database-tools but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
$ sudo apt --fix-broken install         

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  mongodb-database-tools
The following NEW packages will be installed:
  mongodb-database-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
6 not fully installed or removed.
Need to get 0 B/52.7 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
(Reading database ... 47772 files and directories currently installed.)
Preparing to unpack .../mongodb-database-tools_100.3.1_amd64.deb ...
Unpacking mongodb-database-tools (100.3.1) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-database-tools_100.3.1_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mongodb-database-tools_100.3.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
➜  ~ 


` trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1`

Can I just delete that or what?
Score:0
in flag

You can fix issue using dpkg in your case.

Force install mongodb tools package using dpkg.

sudo dpkg -i --force-all /var/cache/apt/archives/mongodb-database-tools_100.3.1_amd64.deb

Clean up all existing mongodb packages.

sudo apt purge mongodb*

After that install you should be able to install latest mongodb.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.