0

When I run sudo apt-get purge mongodb-org*, I get this:

me@myserver:/var/lib$ sudo apt-get purge mongodb-org*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'mongodb-org' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-shell' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-server' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-mongos' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-tools' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-unstable' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-mongos' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-server' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-shell' for regex 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-tools' for regex 'mongodb-org*'
Package mongodb-org-unstable is not installed, so not removed
Package mongodb-org-unstable-mongos is not installed, so not removed
Package mongodb-org-unstable-server is not installed, so not removed
Package mongodb-org-unstable-shell is not installed, so not removed
Package mongodb-org-unstable-tools is not installed, so not removed
The following packages will be REMOVED:
  mongodb-org* mongodb-org-mongos* mongodb-org-server* mongodb-org-shell* mongodb-org-tools*
0 upgraded, 0 newly installed, 5 to remove and 86 not upgraded.
1 not fully installed or removed.
After this operation, 292 MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 44327 files and directories currently installed.)
Removing mongodb-org ...
arg: remove
Purging configuration files for mongodb-org ...
dpkg: warning: while removing mongodb-org, directory '/var/lib/mongodb' not empty so not removed.
Removing mongodb-org-server ...
invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error processing mongodb-org-server (--purge):
 subprocess installed pre-removal script returned error exit status 100
configured to not write apport reports
                                      invoke-rc.d: unknown initscript, /etc/init.d/mongod not found.
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 100
Removing mongodb-org-mongos ...
Removing mongodb-org-shell ...
Removing mongodb-org-tools ...
Processing triggers for man-db ...
Errors were encountered while processing:
 mongodb-org-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

What can be wrong?

0

looks like a buggy postrm script trying to manipulate stuff that has already been removed.

The script should be at /var/lib/dpkg/info/mongodb-org-server.postrm . You can edit or remove it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.