Topic
This article explains how to remove the NinjaOne agent from a managed endpoint.
Environment
NinjaOne Agent
Description
This guide provides instructions for deleting an inactive, rejected, or archived device from the NinjaOne console and uninstalling the NinjaOne agent.
Get Started: NinjaOne Removal (NinjaOne Inc. 01:13)
Select a topic to continue:
- Uninstall from the NinjaOne Interface (Preferred)
- Uninstall NinjaOne for an Entire Organization
- Manual Uninstall
- NinjaOne Uninstall Prevention
- Additional Resources
Uninstall from the NinjaOne Interface (Preferred)
If a device is online and checking in with NinjaOne, deleting a node from within NinjaOne triggers a silent uninstall of the NinjaOne agent. When uninstalling devices from NinjaOne, you have several options:
- Uninstall at the device level: Delete a specific device. The NinjaOne agent remains installed on all other devices within that organization.
- Uninstall from the Devices search page: Delete one or more devices regardless of their organization. The NinjaOne agent remains installed on all other devices on the console, regardless of their organization or type.
- Uninstall from the organization level: You must use this method for Hyper-V device types. You can also reject other device types from this page, preventing the selected devices from registering in NinjaOne again. NinjaOne immediately deletes rejected devices.
Uninstall from the Overview Tab on the Device Dashboard
- In NinjaOne, navigate to the dashboard of the device you'd like to remove from the platform.
- On the Overview tab, click the Edit menu, as shown in Figure 1.
- Select Delete.

Uninstall from the Devices Search Page
- Click Devices, select the checkboxes next to the device names, then click Delete. A notification appears to confirm the uninstallation.

Uninstall from the Organization Configuration Page
Uninstall the Hyper-V device:
- Open the Virtualization tab.
- Move your cursor over the row with the device information and click Delete.

Reject Devices and Restrict Them from Registration in NinjaOne
- Open the Devices tab.
- Select Status.
- Open the appropriate tab (Pending, Approved, or Rejected) to find the device.
- Select the checkbox next to the device name, then click Reject.

Uninstall NinjaOne for an Entire Organization
Deleting the organization from within NinjaOne triggers a silent uninstallation of the NinjaOne agent on all devices in the organization.
- Click Dashboard and select an Organization.
- The Organization dashboard displays. Click the trash can icon.

- A confirmation pop-up will appear. Keep any stored backup data or delete it permanently, and enter your email address to confirm.
- Click the Delete button to delete the node.
Manual Uninstall
Use the steps below only for cases where the agent has not checked in or the installation is corrupt.
Windows Agent Manual Removal
You can use one of the following methods to uninstall NinjaOne silently.
If you do not have uninstall prevention enabled:
Use the following command to complete the silent uninstall:
"C:Program Files (x86)<NinjaInstallFolder>uninstall.exe" --mode unattended
If you do have uninstall prevention enabled:
Follow these steps to complete the silent uninstall:
- Make sure that the NinjaRMMAgent service is running on the device.
- Run this command to restore the agent uninstaller for the device:
"C:Program Files (x86)<NinjaInstallFolder>NinjaRMMAgent.exe" -disableUninstallPrevention
- Run the following command to perform the silent uninstall:
"C:Program Files (x86)<NinjaInstallFolder>uninstall.exe" --mode unattended
After Uninstallation:
To ensure complete removal, check for and delete the following folders:
C:Program Files (x86)<OrganizationName-Version>
C:ProgramDataNinjaRMMAgent
Program Files (x86); removing all of them is essential.Alternatively, use the NinjaOneAgentRemoval.ps1 PowerShell script available in our Custom Script: NinjaOne Agent Removal (Windows) article. Refer to the following instructions on how to use this script.
Windows Agent Removal with PowerShell Script
- Download the NinjaOneAgentRemoval.ps1 PowerShell script from our Custom Script: NinjaOne Agent Removal (Windows) article. Do not save the download to Overdrive, as PowerShell may not recognize it from this location.
- Open Windows PowerShell from your Start menu. Ensure you run the program as an administrator. If this option is not available on the screen, right-click the application to select it.

- If you have not already set the execution policy to allow scripts to run, use the following command:
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
- Confirm the action if prompted.
- Navigate to the directory where you downloaded the
NinjaOneAgentRemoval.ps1script. Use the CD (change directory) command followed by the path to the directory containing the script. For example:
cd "C:/Users/MRogers/Desktop"
cd "Downloads"
- Use the command below to execute the script with the desired options.
.NinjaOneAgentRemoval.ps1
- If you see an error message, type the following commands, pressing the Enter key for each, before moving on to step 8:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
Unblock-File -Path .NinjaOneAgentRemoval.ps1
- Allow the script to run until execution finishes. Depending on the actions performed, this may take several minutes.
- When the script fully executes, verify that the old agent has been removed and check for any error messages or prompts that may have occurred. When the script successfully removes the old agent, you can install a new agent.
- If you encounter any issues during the process, gather as much information as possible, including screenshots of error messages, and contact NinjaOne Support for further assistance.
macOS Agent Manual Removal
- Navigate to Finder.
- Select Applications.
Find the NinjaRMMAgent folder.
This is a hidden folder. To display the folder, use the Shift + Command + Period keys.- Select Uninstall. Be sure to include the following in the uninstall:
networkd_settings_read_from_fileInitialized network settings by reading the list directly.default 09:15:44.324203+1000 ninjarmm-macagent-patcherReceived configuration update from daemon (initial).default 09:15:44.328373+1000 ninjarmm-macagent-patcher UNIX error exception: 17.
Alternatively, you can use the NinjaOneAgentRemovalmacOS.sh script available in our Custom Script: NinjaOne Agent Removal (macOS) article. You must run the script as root.
Location of System Services
Use the system services below to have the NinjaOne agent download the certificate:
/Library/LaunchAgents/com.ninjarmm.trayicon.plist
/Library/LaunchDaemons/com.ninjarmm.agentd.plist
/Library/LaunchDaemons/com.ninjarmm.patcher.plist
Linux Agent Manual Removal
Change directories to /opt/NinjaRMMAgent/programfiles/ and run one of the following commands:
sudo ./ninja-deb-uninstall.sh
sudo ./ninja-deb-harakiri.sh
sudo ./ninja-rpm-uninstall.sh
/tmp directory to allow for a fresh installation:sudo mv /var/lib/dpkg/info/<packagename.*> /tmp
NinjaOne Uninstall Prevention
When NinjaOne uninstall prevention is ON, deleting a device from the NinjaOne console using the steps above still successfully uninstalls the NinjaOne agent when the device is online and connected to NinjaOne. This procedure is the recommended method of uninstallation. Refer to NinjaOne Uninstall Prevention for more information.
If manual uninstallation is required (for example, a device is offline and not connecting to NinjaOne), but uninstall prevention is ON, use one of the manual uninstallation procedures outlined in the Windows Agent Manual Removal section of this article.
To learn about uninstalling the components from optional NinjaOne integrations (such as TeamViewer, Splashtop, Webroot, or Cloudberry), refer to Uninstalling Integrated Components.
Additional Resources
Refer to the following articles to learn more about working with the NinjaOne agent: