Skip to content

[Agent] Error uninstalling Windows agent: utmstack_updater.log in use #1678

@osmontero

Description

@osmontero

Error when trying to uninstall the UTMStack Windows agent.

Error:
Remove-Item : Cannot remove item C:\Program Files\UTMStack\UTMStack Agent\logs\utmstack_updater.log: The process cannot access the file 'utmstack_updater.log' because it is being used by another process.

Context:
When running the uninstallation script in PowerShell, the service is stopped and removed correctly, but it fails when trying to remove the directory C:\Program Files\UTMStack\UTMStack Agent because the log file utmstack_updater.log remains locked by another process (likely the updater itself or a remnant of the service that didn't release the file in time).

Steps to reproduce:

  1. Install the UTMStack Windows agent.
  2. Attempt to uninstall using the PowerShell command.
  3. The process fails at the file cleanup step (Remove-Item).

Suggested solution:
Ensure that all related processes (including the updater) are completely stopped before attempting to delete files, or add a short delay/retry in the uninstallation script to allow file handles to close.

Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

👀 In review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions