Ubuntu: I deleted /etc/php5. How do I restore the folder?


I removed the folder /etc/php5, after I removed the php5 package. Then I tried to install the package, but it said the folder did not exist. I looked in trash folder and couldn't find it. How do I restore the folder?


Lets try purging your package and reinstalling it.

  sudo apt-get purge php5-common php5  sudo apt-get install php5-common php5  

Try this. Note your php5 stuff might get removed and then need to be reinstalled after the fact, because php5-common is a dependency for all the other php5 stuff.


Is some cases the problem is related to the installation system {apt-get, dpkg} which remembers that you have deleted configuration files and make you pay for this sin forever.

Try something like:

apt-get install php5-cli php5-comon php5-cli -o Dpkg::Options::=--force-confmiss  

The --force-confmiss flag is supposed to make dpkg reinstall files that where detected as deleted.

Please check out the man page for more information.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »