Skip to content

dbc leaves driver in partially uninstalled state when in use on Windows #132

Closed

Description

@amoeba

This may be an edge case but, only on Windows due to how files work there, if you:

  1. Have a driver loaded with a driver manager
  2. Run dbc uninstall ${driver}

dbc will act like it failed but will actually have partially removed the driver. For (1), technically anything that locks the driver DLL or probably parent dir down will cause this.

C:\Users\Bryce>dbc uninstall duckdb
Error: failed to uninstall driver: failed to delete driver shared object: error removing driver duckdb: remove C:\Users\Bryce\AppData\Roaming\ADBC\Drivers\duckdb_windows_amd64_v1.4.0\duckdb.dll: Access is denied.

C:\Users\Bryce>dir C:\Users\Bryce\AppData\Roaming\ADBC\Drivers\duckdb_windows_amd64_v1.4.0
 Volume in drive C has no label.
 Volume Serial Number is A896-80F2

 Directory of C:\Users\Bryce\AppData\Roaming\ADBC\Drivers\duckdb_windows_amd64_v1.4.0

10/16/2025  04:20 PM    <DIR>          .
10/16/2025  01:52 PM    <DIR>          ..
10/16/2025  01:52 PM        34,269,152 duckdb.dll

The registry key does get removed so the driver DLL that gets left behind is basically inaccessible.

We could possibly move the DLL removal before the registry removal, at least on Windows, or we could just catch the above case and print a message indicating that the driver may have been removed but left behind extra files.

Activity

  1. added theissue type on Oct 17, 2025
  2. zeroshade commented on Oct 20, 2025

    @zeroshade
    Member

    I agree that moving the DLL removal before the key removal is definitely a better choice than indicating that extra files were left behind.

  3. added a commit that references this issue on Oct 21, 2025
    2dd508b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions