Fix for macOS apps that won’t open with error “XXX.app” is damaged and can’t be opened. You should move it to the Trash

xattr -cr /Applications/AppName.app

Here, AppName.app is the name of the app you cannot open—for example:

xattr -cr /Applications/PicGo.app/

References

Solving the error “App” is damaged and can’t be opened. You should move it to the Trash (Mac)