Cant be opened because Apple Cannot check it for malicious software command line?

Fix “X can’t be opened because Apple cannot check for malicious software” and “Developer or app can’t be verified” using the command line.

Mac OS X Catalina has introduced a new host of permission issues. There are workarounds for applications that you’re installing to your “Applications” folder, namely right-click and use the “Open” -> “Open Anyway” trick.

For developers among you, you will want to use the command line to fix this situation rather than clicking around the UI.

For the non-developers among you, some applications will fail to open even if you give them the correct system & security settings.

This post details how to do that using the command line (Terminal) and xattr -d com.apple.quarantine .

Table of Contents
  • The manual permissions workaround
  • Use the command line to fix “Apple cannot check for malicious software” and “Developer or app can’t be verified”

The manual permissions workaround

In order to open an application that “can’t be opened because Apple cannot check for malicious software” or “Developer or app can’t be verified”, we open Finder and go to Applications.

Find the relevant application and right-click it.

When the right-click menu opens, select & click “Open” and when the dialog opens, click “Open”.

Use the command line to fix “Apple cannot check for malicious software” and “Developer or app can’t be verified”

Your terminal application (I use iTerm but Mac OS comes with Terminal). Find the path of your application.

For applications in your “Applications” folder, that will be something like: /Applications/.app.

Use xattr to delete the com.apple.quarantine attribute:

xattr -d com.apple.quarantine /Applications/.app

You can then check that it’s been deleted using xattr's default behaviour.

xattr /Applications/.app

That’s how you can open applications for which “Apple cannot check for malicious software” or “Developer or app can’t be verified”.

Get The Jest Handbook (100 pages)

Take your JavaScript testing to the next level by learning the ins and outs of Jest, the top JavaScript testing library.

Find out more

or

Join 1000s of developers learning about Enterprise-grade Node.js & JavaScript

Get The Jest Handbook (100 pages)

Take your JavaScript testing to the next level by learning the ins and outs of Jest, the top JavaScript testing library.

I'm running macOS 10.15 Catalina. When I try to install a program, I see the following error: 'visual studio code' can’t be opened because apple cannot check it for malicious software."

Occasionally, you will come across security messages like “Apple cannot check it for malicious software” when you try to launch an app on your Mac. If this happens for an app that you really need to use, it can cause trouble as the system will not let you use the app no matter what.

If you find yourself struggling with this message, this guide provides you with some tips on what you can do. You can follow one of these methods and your Mac will open any of your apps without displaying any messages of any kind.

  • Part 1. What Causes “Cannot be opened because Apple cannot check it for malicious software” Error
  • Part 2. How to Bypass “Apple cannot check it for malicious software” Error and Open Apps
  • Bonus Tip: How to Recover Lost or Deleted Data on Mac? Hot

Part 1. What Causes “Cannot be opened because Apple cannot check it for malicious software” Error

If you are seeing the “can’t be opened because Apple cannot check it for malicious software.” message for the first time, you will probably be wondering how it came up on your Mac all of a sudden.

In the new versions of macOS, Apple wants you to only use the apps that are authorized by Apple itself. All apps downloaded from the Mac App Store fall into the authorized category. However, when you install Mac apps, plug-ins, and installer packages from outside the App Store, macOS checks the Developer ID signature to verify that the software is from an identified developer and that it has not been altered.

If you see this warning, it means that the app was not notarized, your Mac throws the message that reads “cannot be opened because Apple cannot check it for malicious software”.

apple cannot check it for malicious software

Part 2. How to Bypass “Apple cannot check it for malicious software” Error and Open Apps

Resolving the aforementioned issue is pretty easy. You can change a security option on your machine and that will allow all your apps to launch without any problems.

1. Change Your Security Preferences

One of the ways to get around the ““Visual Studio Code” can’t be opened because Apple cannot check it for malicious software.” issue is to allow your Mac to open any apps. This will bypass the security restrictions on your machine.

  • Click the Apple logo at the top-left corner of your screen and select System Preferences.
  • Click Security & Privacy on the following screen.
  • Select the Allow button under the Allow apps downloaded from section.

    can’t be opened because apple cannot check it for malicious software
  • Launch your app and it will open without any messages.

2. Right Click App

Instead of double clicking on the app, you can actually right click and press Open to launch the app without having to see any security messages.

  • Find the app you have downloaded and right-click on it.
  • Select Open and then you will find the option to open the app regardless of any security warnings.

    cannot be opened because apple cannot check it for malicious software

You can now use the app.

3. Remove the Quarantine Extended Attribute

Your downloaded apps have a certain attribute applied to them by your system. You can completely remove the attribute from your app by running the following command in the Terminal.

  • Launch the Terminal on your Mac.
  • Type the following command and hit Enter. Make sure to replace the path with your app’s path.

    xattr -d com.apple.quarantine /path/to/file

    can't be opened because apple cannot check it for malicious software
  • Close the Terminal and launch your app.

Bonus Tip: How to Recover Lost or Deleted Data on Mac?

When you use any technical methods on your Mac, like the Terminal one, there are chances that you may end-up corrupting or deleting your files. This often happens when you perform really complex procedures.

If you have already lost your files due to a method, you might want to recover those files. Luckily, Mac has a tool called Tenorshare 4DDiG for Mac Data Recovery that you can use to find and recover your files on your machine. This tool scans your machine for recoverable files and lets you pick the files that you want to restore on your Mac.

You can utilize this app as follows for recovering data from a Mac.

Buy Tenorshare 4DDiG with coupon code: 4DART30OFF to enjoy 30% OFF now!

  • Install and run the application on your Mac.
  • Select the drive where your data was stored and click Scan at the bottom.

    origin can’t be opened because apple cannot check it for malicious software
  • You will see the list of files that can be recovered. Select the files you want to recover and click Recover at the bottom-right corner.

    visual studio code can’t be opened because apple cannot check it for malicious software.
  • Choose the folder to save your recovered files and hit Recover.

    apple cannot check it for malicious software

That is all you need to do to recover any kind of files from your Mac machine.

How to Recover Deleted Files on Mac [Emptied Trash]

Summary

There are times when you may come across security messages like “can't be opened because Apple cannot check it for malicious software” on your Mac. When this happens, you have the aforementioned methods to fix the issue and to launch your apps without any obstacles. In case you lost your data, you can recover it using Tenorshare 4DDiG for Mac as mentioned above.

Can't be opened because Apple Cannot check it for malicious software command line?

Change Your Security Preferences Click the Apple logo at the top-left corner of your screen and select System Preferences. Click Security & Privacy on the following screen. Select the Allow button under the Allow apps downloaded from section. Launch your app and it will open without any messages.

How do you override Cannot be opened because Apple Cannot check it for malicious software?

If you're certain that the app you want to use is from a trustworthy source, you can override your Mac security settings to open it..
In the Finder on your Mac, locate the app you want to open. Don't use Launchpad to locate the app..
Control-click the app icon, then choose Open from the shortcut menu..
Click Open..

How do I make my Mac detect malicious software?

Check Activity Monitor for Mac malware.
Open Activity Monitor from Applications > Utilities..
Go to the CPU tab, if you're not already in it..
Click the % CPU column to sort high to low, and look for high CPU use..
If you see a process that looks suspicious, do a Google search on it..