[Feature Request] When removing users and networks in ZNC, the physical user/ and network/ directories should be deleted, or there should be an ability to do cleanup
#982
ZNC does not seem to delete the physical user/ and network/ directories (and contents) within ~/.znc if the corresponding users and networks are deleted via *status or *controlpanel or *webadmin.
It similarly does not delete moddata/module/ directories but I find this to be a very good thing - you would want your previous module configuration to be retained if you decide to unload and reload a module. This is specifically for users and networks which are removed.
Perhaps instead of doing this instantly, there could be a CleanConfDir command (or similar). Such as, /msg *status CleanConfDir which would compare the physical conf directory contents to the existing users and networks defined in the conf and remove the ones which are no longer valid.
I do periodic backups of my entire ~/.znc directory and it is bothersome that there are so many users and networks which were long since deleted.
ZNC does not seem to delete the physical `user/` and `network/` directories (and contents) within `~/.znc` if the corresponding users and networks are deleted via `*status` or `*controlpanel` or `*webadmin`.
It similarly does not delete `moddata/module/` directories but I find this to be a very good thing - you would want your previous module configuration to be retained if you decide to unload and reload a module. This is specifically for users and networks which are removed.
Perhaps instead of doing this instantly, there could be a CleanConfDir command (or similar). Such as, `/msg *status CleanConfDir` which would compare the physical conf directory contents to the existing users and networks defined in the conf and remove the ones which are no longer valid.
I do periodic backups of my entire `~/.znc` directory and it is bothersome that there are so many users and networks which were long since deleted.
Tested on:
```
<*status> ZNC 1.9.x-git-108-60ea155 - https://znc.in
<*status> IPv6: yes, SSL: yes, DNS: threads, charset: yes, i18n: yes
<*status> ZNC 1.8.2 - https://znc.in
<*status> IPv6: yes, SSL: yes, DNS: threads, charset: yes, i18n: yes, build: cmake
```
<!-- github-sync-id:842137811 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
ZNC does not seem to delete the physical
user/andnetwork/directories (and contents) within~/.zncif the corresponding users and networks are deleted via*statusor*controlpanelor*webadmin.It similarly does not delete
moddata/module/directories but I find this to be a very good thing - you would want your previous module configuration to be retained if you decide to unload and reload a module. This is specifically for users and networks which are removed.Perhaps instead of doing this instantly, there could be a CleanConfDir command (or similar). Such as,
/msg *status CleanConfDirwhich would compare the physical conf directory contents to the existing users and networks defined in the conf and remove the ones which are no longer valid.I do periodic backups of my entire
~/.zncdirectory and it is bothersome that there are so many users and networks which were long since deleted.Tested on:
This appears to be a duplicate of https://github.com/znc/znc/issues/260