[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

Closed
opened 2026-10-05 04:57:01 +02:00 by adam · 1 comment
Owner

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
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 -->
adam closed this issue 2026-10-05 04:57:01 +02:00
Author
Owner

This appears to be a duplicate of https://github.com/znc/znc/issues/260

This appears to be a duplicate of https://github.com/znc/znc/issues/260 <!-- github-comment-id:808435305 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#982