LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Force remove apache2-mpm-prefork (https://www.linuxquestions.org/questions/linux-newbie-8/force-remove-apache2-mpm-prefork-720268/)

jchambers 04-19-2009 05:24 PM

Force remove apache2-mpm-prefork
 
Hello.

I for some reason I can not remove apache2-mpm-prefork & apache2.2-common.


Code:

ri  apache2-mpm-prefork              2.2.3-4+etch6                        Traditional model for Apache HTTPD 2.1
ri  apache2.2-common                  2.2.3-4+etch6                        Next generation, scalable, extendable web se

Code:

apt-get remove apache2-mpm-prefork apache2.2-common
Reading package lists... Done
Building dependency tree... Done
The following packages will be REMOVED:
  apache2-mpm-prefork apache2.2-common
0 upgraded, 0 newly installed, 2 to remove and 20 not upgraded.
Need to get 0B of archives.
After unpacking 4465kB disk space will be freed.
Do you want to continue [Y/n]?
(Reading database ... 32796 files and directories currently installed.)
Removing apache2-mpm-prefork ...
Stopping web server (apache2)...grep: /etc/apache2/*: No such file or directory
 failed!
invoke-rc.d: initscript apache2, action "stop" failed.
dpkg: error processing apache2-mpm-prefork (--remove):
 subprocess pre-removal script returned error exit status 1
dpkg: apache2.2-common: dependency problems, but removing anyway as you request:
 apache2-mpm-prefork depends on apache2.2-common (= 2.2.3-4+etch6).
Removing apache2.2-common ...
Stopping web server (apache2)...grep: /etc/apache2/*: No such file or directory
 failed!
invoke-rc.d: initscript apache2, action "stop" failed.
dpkg: error processing apache2.2-common (--remove):
 subprocess pre-removal script returned error exit status 1
Errors were encountered while processing:
 apache2-mpm-prefork
 apache2.2-common
E: Sub-process /usr/bin/dpkg returned an error code (1)


I have tried
# apt-get -f install
It installs apache2.2-utils

Any ideas on how to reomve this pest...

Jon

arckane 04-20-2009 10:07 AM

dpkg -r --force-all {package-names}

Give that a whirl.

farslayer 04-20-2009 10:33 AM

Interesting the packages are currently marked for re-installation.. 'ri' -

it looks like the uninstall is failing because it can't run the stop scripts.. did you manually remove any files from apache ?

I would attempt to purge the packages and all their config.

apt-get
apt-get --purge remove apache2-mpm-prefork apache2.2-common

dpkg
dpkg -P apache2-mpm-prefork apache2.2-common

aptitude
aptitude purge ~apache2

jchambers 04-20-2009 12:56 PM

Thank you for your inputs. Your comments gave me an idea to try and reinstall which seemed to work. I was not able to remove or purge without the reinstall.

I had uninstalled apache2 then deleted the /etc/apache2 folder manually which was a mistake. (lesson learned)


Code:

# aptitude reinstall apache2 apache-common  apache-dev apache2.2-common

Thanks again,
Jon

farslayer 04-20-2009 02:19 PM

Yes to get rid of all the config files when uninstalling a package, you should use the purge option..

Learn something new every day ehh ? :)


All times are GMT -5. The time now is 11:54 AM.