Reinstall the agent

There are two common scenarios when you want to reinstall the Patchdeck agent on a system and keep the configuration settings unchanged:

  1. You did rebuild the system and now want to still track it under the same ID in your Patchdeck console (so that it stays part of the same groups or patch policies)
  2. There is an updated version of the agent available

Here are the recommended steps for both scenarios:

Scenario 1

Windows

  1. Browse to the detail page of the system and note down the system ID. You can see the system ID at the end of the URL. Also note down you client ID and client secret. You can find both values at https://patchdeck.com/patch_management/authentication
  2. Go to https://patchdeck.com/patch_management/agents and download the agent for Windows
  3. Extract the files into a directory, we recommend "C:\Program Files\PatchdeckWindowsAgent"
  4. Open a Powershell session as an administrator, change into the directory you chose in step 2 and run the command (substituting the values from step 1): .\PatchdeckWindowsAgent.exe -install CLIENT_ID CLIENT_SECRET SYSTEM_ID
  5. You have successfully reinstalled the agent

Linux

  1. Browse to the detail page of the system and note down the system ID. You can see the system ID at the end of the URL. Also note down you client ID and client secret. You can find both values at https://patchdeck.com/patch_management/authentication
  2. Go to https://patchdeck.com/patch_management/agents and download the agent for Linux
  3. Extract the downloaded file "patchdeck-linux-agent.zip" to a directory that is only writable by the root user (we recommend /opt/patchdeck-agent): sudo unzip patchdeck-linux-agent -d /opt/patchdeck-agent
  4. Run the following command to install the agent (substituting the values from step 1): sudo ./patchdeck-agent -install CLIENT_ID CLIENT_SECRET SYSTEM_ID
  5. For creating a user for the agent and configuring the cronjob follow the instructions at https://docs.patchdeck.com/article/10-add-system-to-patch-management
  6. You have successfully reinstalled the agent

Mac

  1. Browse to the detail page of the system and note down the system ID. You can see the system ID at the end of the URL. Also note down you client ID and client secret. You can find both values at https://patchdeck.com/patch_management/authentication
  2. Go to https://patchdeck.com/patch_management/agents and download the agent for Mac
  3. Create the directory ~/opt/patchdeck-agent and extract the downloaded file "patchdeck-mac-agent.zip" to this directory: unzip patchdeck-mac-agent -d ~/opt/patchdeck-agent
  4. Run the following command to install the agent (substituting the values from step 1): sudo ./patchdeck-agent -install CLIENT_ID CLIENT_SECRET SYSTEM_ID
  5. For creating a user for the agent and configuring the cronjob follow the instructions at https://docs.patchdeck.com/article/10-add-system-to-patch-management
  6. You have successfully reinstalled the agent

Scenario 2

Windows

  1. Make sure you are logged in with an administrator account
  2. Open a Powershell session and change into the directory where the agent is installed, e.g. "C:\Program Files\PatchdeckWindowsAgent"
  3. Uninstall the agent by running the command: .\PatchdeckWindowsAgent -uninstall
  4. Copy the configuration file for the agent to another directory, the name of the configuration file is "PatchdeckWindowsAgent.exe.config"
  5. Remove the directory of the agent, e.g. by running the Powershell command "Remove-Item -Recurse PatchdeckWindowsAgent"
  6. Go to https://patchdeck.com/patch_management/agents and download the new version of the agent for Windows
  7. Extract the files into a directory, we recommend "C:\Program Files\PatchdeckWindowsAgent"
  8. Copy the old configuration file into the directory you chose in the step above (confirm to overwrite the existing file)
  9. In a Powershell session, change into the directory and run the command: .\PatchdeckWindowsAgent.exe -reinstall
  10. You have successfully reinstalled the agent

Linux

  1. Remove the file "patchdeck-agent" but keep the configuration file with the name "config.json"
  2. Go to https://patchdeck.com/patch_management/agents and download the new version of the agent for Linux
  3. Extract the downloaded file to the directory you created for the agent
  4. Change into the directory and run the command: sudo ./patchdeck-agent -reinstall
  5. You have successfully reinstalled the agent

Mac

  1. Remove the file "patchdeck-agent" but keep the configuration file with the name "config.json"
  2. Go to https://patchdeck.com/patch_management/agents and download the new version of the agent for Mac
  3. Extract the downloaded file to the directory you created for the agent
  4. Change into the directory and run the command: sudo ./patchdeck-agent -reinstall
  5. You have successfully reinstalled the agent

Still need help? Contact Us Contact Us