title: How do I do a clean re-install of zoneminder?
body: <p>Because doing this:-</p>
  
  <pre><code>sudo apt-get remove --purge zoneminder
  sudo apt-get remove --purge mysql-server mysql-client mysql-common
  sudo rm -rf /var/lib/mysql
  sudo apt-get remove --purge apache2*
  sudo apt-get clean
  sudo apt-get update
  sudo apt-get upgrade
  sudo rm -r /var/www/*
  sudo rm -r /etc/apache2/*
  sudo rmdir /var/www
  sudo rmdir /etc/apache2
  sudo rm -r /opt/zm
  sudo rm /etc/apache2/conf.d/zoneminder.conf
  sudo dpkg --configure -a
  
  reboot hardware
  
  sudo apt-get install zoneminder
  </code></pre>
  
  <p>produces this error:-</p>
  
  <pre><code> * Starting web server apache2                                                                                                                               apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                                                                                                        [ OK ]
  Setting up libapache2-mod-php5 (5.4.6-1ubuntu1.4) ...
  
  Creating config file /etc/php5/apache2/php.ini with new version
   * Restarting web server apache2                                                                                                                             apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
   ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                                                                                                        [ OK ]
  Setting up apache2 (2.2.22-6ubuntu2.3) ...
  Setting up zoneminder (1.25.0-1.1ubuntu1) ...
  Starting ZoneMinder: Can't open config file '/opt/zm/etc/zm.conf': No such file or directory at /usr/local/share/perl/5.14.2/ZoneMinder/Config.pm line 100
  BEGIN failed--compilation aborted at /usr/local/share/perl/5.14.2/ZoneMinder/Config.pm line 100.
  Compilation failed in require at /usr/local/share/perl/5.14.2/ZoneMinder.pm line 33.
  BEGIN failed--compilation aborted at /usr/local/share/perl/5.14.2/ZoneMinder.pm line 33.
  Compilation failed in require at /usr/bin/zmpkg.pl line 37.
  BEGIN failed--compilation aborted at /usr/bin/zmpkg.pl line 37.
  failure
  
  invoke-rc.d: initscript zoneminder, action "start" failed.
  dpkg: error processing zoneminder (--configure):
   subprocess installed post-installation script returned error exit status 2
  Processing triggers for libc-bin ...
  ldconfig deferred processing now taking place
  Processing triggers for ureadahead ...
  Errors were encountered while processing:
   zoneminder
  E: Sub-process /usr/bin/dpkg returned an error code (1)
  </code></pre>
  
  <p>Originally zoneminder installed "first time" Ok on this 32bit "mint 14" machine using just the single apt-get install zoneminder command from here:-
  <a href="http://www.tuxradar.com/content/build-your-own-surveillance-zoneminder" rel="nofollow">http://www.tuxradar.com/content/build-your-own-surveillance-zoneminder</a>
   but when I tried to upgrade a couple of days ago to version 1.26.2 by compiling manually, I messed it up.</p>
  
  <p>How can I remove zoneminder completely so that the original "clean" install works again?</p>