Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to install APE-Server from the .deb file at the ape-server homepage ( and I ran into an error so wanted to try removing the installation and reinstalling. I did a sudo apt-get remove ape-server which ran successfully but left ape-server folders in my /etc/ and /etc/init.d locations. Me being an idiot new comer to linux decided that manually delete those folders. Now when I reinstall the ape-server those folders don't get recreated and therefore I cannot send the

 /etc/init.d/ape-server [option] 

command because the folder is not found.

When I try to sudo apt-get purge (or remove) ape-server I get the following

   sudo apt-get purge ape-server
   Reading package lists... Done
   Building dependency tree       
   Reading state information... Done
   The following packages will be REMOVED:
   0 upgraded, 0 newly installed, 1 to remove and 92 not upgraded.
   1 not fully installed or removed.
   After this operation, 1,753kB disk space will be freed.
   Do you want to continue [Y/n]? y
   (Reading database ... 43924 files and directories currently installed.) 
   Removing ape-server ...
   invoke-rc.d: unknown initscript, /etc/init.d/ape-server not found.
   dpkg: error processing ape-server (--purge): 
   subprocess installed pre-removal script returned error exit status 100
   update-rc.d: /etc/init.d/ape-server: file does not exist
   dpkg: error while cleaning up:
   subprocess installed post-installation script returned error exit status 1
   Errors were encountered while processing:
   E: Sub-process /usr/bin/dpkg returned an error code (1)

My question is; how do I remove all of the ape-server installation packages that were installed so I can reinstall from scratch?

share|improve this question
have you tried to trick dpkg by creating an empty file? – RolandiXor Mar 4 '11 at 20:43
@Roland, I created an empty directory in /etc/init.d/ called "ape-server" but I'm not sure what type of file its looking for within that folder. – sadmicrowave Mar 4 '11 at 20:50
up vote 1 down vote accepted

Since we know it worked, I'll answer your question:

Create an empty file:

  • /etc/init.d/ape-server

Now remove the package, and it will be all clear.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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