I used apt to remove the apache module and re-install it. The directory does not get recreated by the installation.
$ sudo apt-get remove --purge libapache2-mod-fcgid $ sudo rm -rf /var/lib/apache2/fcgid/ $ sudo apt-get install libapache2-mod-fcgid $ ls -lah /var/lib/apache2/fcgid/ total 12K drwxr-xr-x 3 www-data www-data 4.0K Jan 6 12:55 . drwxr-xr-x 6 root root 4.0K Jan 6 12:55 .. drwxr-xr-x 2 www-data www-data 4.0K Oct 11 14:15 sock
I used apt to remove the apache module and re-install it. The directory does not get recreated by the installation.
$ sudo apt-get remove --purge libapache2- mod-fcgid apache2/ fcgid/ mod-fcgid apache2/ fcgid/
$ sudo rm -rf /var/lib/
$ sudo apt-get install libapache2-
$ ls -lah /var/lib/
total 12K
drwxr-xr-x 3 www-data www-data 4.0K Jan 6 12:55 .
drwxr-xr-x 6 root root 4.0K Jan 6 12:55 ..
drwxr-xr-x 2 www-data www-data 4.0K Oct 11 14:15 sock