You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

clipboard

How do I clear my clipboard? There is something on it from a previous copy and paste, and I can't get rid of it. So everytine I try to cut and paste, the old cut gets pasted. Help!

iMac (2017 – 2020)

Posted on Jun 10, 2023 8:49 AM

Reply
Question marked as Top-ranking reply

Posted on Jun 10, 2023 9:08 AM

Launch the Terminal and at the prompt, enter the following to clear the main clipboard:


pbcopy <<<""

or AppleScript copy/pasted into Script Editor, click compile and run:


use framework "Foundation"
use AppleScript version "2.4" -- Yosemite 10.10 or later
use scripting additions

property ca : current application

set pb to ca's NSPasteboard's generalPasteboard()
pb's clearContents()
return



You can even save this as a double-clickable script or application to your Desktop when you want to quickly clear the clipboard.



6 replies
Question marked as Top-ranking reply

Jun 10, 2023 9:08 AM in response to bobmono

Launch the Terminal and at the prompt, enter the following to clear the main clipboard:


pbcopy <<<""

or AppleScript copy/pasted into Script Editor, click compile and run:


use framework "Foundation"
use AppleScript version "2.4" -- Yosemite 10.10 or later
use scripting additions

property ca : current application

set pb to ca's NSPasteboard's generalPasteboard()
pb's clearContents()
return



You can even save this as a double-clickable script or application to your Desktop when you want to quickly clear the clipboard.



clipboard

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.