I accidently removed /etc/passbolt and cannot reinstall or get the missing files

[y] I have read intro post: About the Installation Issues category
[y] I have read the tutorials, help and searched for similar issues
[y] I provide relevant information about my server (component names and versions, etc.)
[y] I describe the steps I have taken to trouble shoot the problem
[y] I describe the steps on how to reproduce the issue

I rm -rf /etc/passbolt and now I cannot reinstall it.

What I have tried was removing passbolt-ce-server using apt remove passbolt-ce-server -y && auto remove. I then proceeded to remove it from the sources list /etc/apt/sources.list.d/passbolt.sources
Rebooted, then tried to install it again. I get through the entire db setup and past the ssl certs setup. Only to end up with the below error. Anyone have a fix ?
I even tried dpkg fix install, still I get the below error

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up passbolt-ce-server (3.5.0-1) ...
PHP Warning:  require(/etc/passbolt/requirements.php): failed to open stream: No such file or directory in /usr/share/php/passbolt/bin/cake.php on line 4
PHP Fatal error:  require(): Failed opening required '/etc/passbolt/requirements.php' (include_path='.:/usr/share/php') in /usr/share/php/passbolt/bin/cake.php on line 4
dpkg: error processing package passbolt-ce-server (--configure):
 installed passbolt-ce-server package post-installation script subprocess returned error exit status 255
Processing triggers for nginx-core (1.18.0-0ubuntu1.2) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Hi @JamesBond :wave: and welcome to passbolt community forum :handshake:

I guess after removing passbolt, if you check if package is installed, you have this:

$ dpkg -l | grep passbolt-ce-server
rc  passbolt-ce-server             3.5.0-1                        all          Passbolt, open source password manager for teams

When you execute apt remove package, it let configuration files on the system, that’s why the output of the command above starts with rc. For apt system, it means configuration files (in /etc) are still there.

To fix this, it is quite simple, you juste have to add –purge argument to your apt remove command, eg:

sudo apt remove --purge passbolt-ce-server -y
sudo apt autoremove --purge

After that, the $ dpkg -l | grep passbolt-ce-server command will returns an empty output. And you will be able to restart your installation from scratch.

Let me know if it fixes your issue.