I am newbie to Debian, and have a question about apt-get.
Conside the following steps:
1) apt-get install apache2
Now apache2 is installed and working fine
2) rm -rf /etc/apache2
I try to remove all configurations
3) dpkg -P apache2
And then I remove apache2
4) apt-get install apache2
I install apache2 again
It succeeds and it doesn't shows any error, but I found that /etc/apache2 is not there, and apache2 is not working, seems that apt-get doesn't know something(/etc/apache2) is missing and it can't rebuild the directory.
so my question is, how to recover from this kind of error? You know, sometimes we may remove some directory accidentally. I know that I can download the source code and compile it to make it working, but does Debian or apt-get provide any way to sovle this kind of error?
Thanks a lot!