How to remove a trojan from a Mac, and what else to do
To remove a trojan from a Mac, start with your accounts, not the file. Stop signing in to accounts with sensitive information. Then remove suspicious login items, LaunchAgents and LaunchDaemons. If signs of a hidden backdoor remain, back up the files you want to keep, then erase the Mac and reinstall macOS. Last, change your passwords and keys from another device, because the trojan may already have copied them. If you use GitHub, read the token warning in remove malware before you revoke anything.
A trojan is a harmful program that reaches your Mac as something you wanted. In one campaign, cracked apps were repackaged as PKG files, installer packages, that included a trojan, and victims ran it assuming it was an activator for the cracked app. What matters for removal is what the program did after it ran. This page covers how to remove a trojan from a Mac and, more important, what removal alone does not fix.
01What a trojan does after it runs
Many trojans try to persist for months. They hide in the background and keep a backdoor connection open, which lets attackers steal files, download additional malicious code or, more likely in a company network, encrypt local files. A backdoor is a hidden way for an attacker to send commands to your Mac. Modern stealers, programs that copy passwords and files, may establish one together with persistence, so they survive reboots and logouts and attackers can send commands from a control server. A control server is the machine the malware reports to and takes orders from.
One concrete case is AMOS, a Mac stealer. In one case its persistence was a root-level LaunchDaemon, a background job that runs for the whole system and starts the payload again at startup. It kept polling the attackers' server so they could send it commands. A backdoor component was added to AMOS in 2025. One AMOS campaign could go from the first user interaction to persistent command-and-control, a lasting link to the attacker's server, within minutes. So by the time you notice something, the trojan may already be set up to return. Another trojan technique is to replace installed crypto wallet apps with trojanized copies. If you keep a crypto wallet app, reinstall it from its developer, not from the copy on the Mac.
02Why deleting the program is not enough
Read the table row by row: each line is something a trojan may have done, and the reason cleaning the Mac cannot undo it.
| What the trojan may have done | Why removal does not undo it | What you do |
|---|---|---|
| Copied passwords, browser data and keychains | The copy is already somewhere else | Change them from a trusted device |
| Stolen a session, the logged-in state of an account | It works from the attacker's machine, without anything staying on yours | Change passwords from a trusted device; the infostealer check covers sessions |
| Opened a backdoor | It may come back after a restart or logout | Remove persistence, or erase and reinstall |
| Downloaded more code | You may remove only the first piece | Remove persistence, or erase and reinstall |
Stolen credentials and session material can let attackers take over online accounts, reach cloud resources and steal cryptocurrency, without needing to stay on your Mac. Mac stealers go after browser data, cookies and session tokens for exactly that reason, and one of them, MacSync, also goes after developer secrets such as SSH keys, AWS credentials and Kubernetes config files. Those are logins and access keys for servers and cloud accounts. That is why the order on this page starts with the accounts.
03How to tell whether a trojan is there
A trojan may show nothing. Still, look at what you can see: slowdowns, freezes or crashes, new browser toolbars, a changed home page, many pop-up ads, a disabled Activity Monitor and messages you did not write. To look at what is running, open Spotlight, type Activity Monitor and click the app. Judging the list is covered on suspicious processes.
Behavior gives more away than names do. Security teams look for a persistent connection to an unfamiliar server, or new LaunchAgent entries that appeared outside a known install event. The full table of signs is on signs of a virus, and fake warnings on screen are on virus pop-up.
04Step 1: Protect the accounts
Before you remove a trojan from a Mac, protect what it could reach. Stop signing in to online accounts with sensitive information, like shopping or banking, until you know more. Think back to what you installed or pasted into Terminal, the app where you type commands, and whether a password prompt appeared before a program went on, as it did in one AMOS infection. Do the later password changes from a trusted system, not from the Mac in question. If you saw ads, websites or emails that seemed to spread malware, or ransomware demanded payment, report it to the FTC at ReportFraud.ftc.gov. The full list of what to replace, in order, is on the infostealer check page.
05Step 2: Remove what keeps the trojan alive
Quitting the process does not remove a trojan, because a backdoor is built to come back. Malware often installs itself persistently, so that it runs again after a restart or login. Once you remove a trojan from a Mac as a running program, the job is not done. Remove what starts it: suspicious login items, LaunchAgents and LaunchDaemons, so the malware does not run again after a restart. The launch folders are ~/Library/LaunchAgents for third-party agents of your user and /Library/LaunchDaemons for third-party system daemons. The click-by-click steps, including Login Items & Extensions, are on remove malware.
06Step 3: Decide on a clean reinstall
If signs of a persistent backdoor or unusual activity remain, consider a full clean reinstall of macOS to ensure all malware components are eradicated. A plain reinstall keeps your apps and personal data, so a clean start means erasing the startup disk first. Erasing permanently deletes the Mac's files, so back up the files you want to keep before you start. Restore files only from backups you know are clean, and do not reuse backups or Time Machine images that may be tainted. The recovery key presses and the restore options are on remove malware.
07Step 4: Replace passwords and keys
Change the passwords that were stored on the affected system and turn on multi-factor authentication for your important accounts. Do it from a device you trust, not from the Mac in question. Follow the order on the infostealer check page.
If you use GitHub, first look on the Mac for the file ~/Library/LaunchAgents/com.user.gh-token-monitor.plist. If it is there, do not revoke any GitHub token yet, not even from another device: the monitor polls GitHub and triggers if the token it checks is revoked. Stop it first with launchctl, the tool that loads and unloads launch agents; the exact command is in step 5 of remove malware. Or wait until it exits by itself after 24 hours. Then revoke. If the file is not there, revoke right away, from another device. The Shai-Hulud page has the story.
08How trojans get onto a Mac
Often the route is a download dressed as something else. Impersonations of AI developer tools, such as Claude_Code_Desktop.dmg or ChatGPT_Plus_v2.dmg, now sit second only to cracked Adobe and creative-suite installers among malicious sample names. Download apps from the App Store, or directly from the developer rather than through an ad or link, and never run copy-pasted commands from random pages or forums. The routes are on can Macs get viruses, and the stealer families are on Mac infostealers.
09Is a free tool enough?
Many people ask for a free trojan remover first. XProtect is built into macOS for the signature-based detection and removal of malware. It handles known threats: when it detects known malware, it blocks it and moves it to the Trash, and it removes malware when Apple sends updated information. Attackers disguise malicious code as legitimate apps to evade detection, so a disguised trojan may not be on that list. Malware can go undetected even with security software, at least for a while, so a quiet scan does not close the case. A tool comparison is on do I need antivirus, and the places to look by hand are on check for a virus.
10The short version
To remove a trojan from a Mac, treat it as two jobs. One is the Mac: remove what keeps the trojan alive, or reinstall macOS. The other is your accounts: stop signing in first, and change passwords and keys last, from another device.
FAQ
Can you fully remove a Trojan virus?
You can remove the program, but you cannot be sure nothing else was left. If signs of a persistent backdoor remain, consider a full clean reinstall of macOS. Data the trojan already copied stays copied, so change passwords from a trusted system.
How do I get rid of Trojan virus on my Mac?
Stop signing in to accounts with sensitive information, remove suspicious login items, LaunchAgents and LaunchDaemons, then change your passwords from a device you trust. The detailed order is on remove malware.
What is the best free Trojan remover?
Start with what is already on the Mac: XProtect is built into macOS for the signature-based detection and removal of malware. A trojan that came with a backdoor may survive a restart, so a scan alone does not close the case. See do I need antivirus for extra tools.
Is there a free malware removal for Mac?
Yes, in the sense that macOS removes known malware by itself: after you update macOS and restart, a built-in tool removes known malware. For a trojan with persistence, the manual steps on this page and on remove malware still apply.
Is Trojan a serious virus?
It can be. Many trojans try to stay for months, hiding in the background and keeping a backdoor connection open for stealing files, downloading more malicious code or, more likely in a company network, encrypting local files. The risk lies in the stolen secrets as much as in the program.
How do I know if my Mac is infected with malware?
Look for slowdowns, new toolbars, homepage changes, many pop-ups, a disabled Activity Monitor or messages you did not write. A trojan may show none of them, so also think back to what you installed. The table is on signs of a virus.
Related guides
Sources
- Malwarebytes, poisoned AI chats and AMOS
- Microsoft Defender Experts, hunting infostealers on macOS
- Jamf Security 360 report via 9to5Mac
- BleepingComputer, cracked macOS apps
- Moonlock, mid-2026 macOS threat report
- Apple Support, launchd script management
- Apple Support, pop-ups and malware on Mac
- Apple Platform Security, protecting against malware
- FTC Consumer Advice, how to recognize, remove and avoid malware
- Wiz, Mini Shai-Hulud
- Artificial Immunity