The new Windows 10 Clipboard lets you save multiple items in the clipboard so that you can use it later. You can also pin the required items in the Clipboard history panel so that they’re not discarded by the system, or accidentally deleted by the user.
You may every now and then want to clear the clipboard to remove any sensitive information like password etc., from the history. This article explains how to create a desktop shortcut to clear the Windows 10 new clipboard history automatically.
Clear Windows 10 clipboard history using shortcut
Using GUI
To clear the clipboard history via the graphical user interface:
- Press WinKey + V and click the ellipsis icon (denoted by three dots), and click Clear all
(or) - Click Start → Settings → System → Clipboard → Clear
This removes the clipboard history in the local computer as well as in your Microsoft cloud account.
You’ll see the message “Your clipboard is empty” when you press WinKey + V.
Note: The pinned clipboard items, if any, are retained though.
To accomplish this using a shortcut or command-line, all you need to do is restart the Clipboard User Service.
Using Batch file
- Open Notepad and paste these lines:
cmd.exe /c "echo off | clip" wmic service where "name like '%%cbdhsvc_%%'" call stopservice wmic service where "name like '%%cbdhsvc_%%'" call startservice
- Save the file as
clear_clipboard.bat
- When you want to clear the clipboard history, right-click on the batch file and click Run as administrator.
Another Command-line Method
Find the short name of the Clipboard User Service using Services MMC.
- Launch the Services MMC (
services.msc
) - Locate Clipboard User Service from the list
- Double-click Clipboard User Service and note down the service name.
The service name contains a random string which varies from one Windows 10 computer to the other. In my system, the service (short) name iscbdhsvc_5d696
Alternately, you can use the Command Prompt to find out the Clipboard User Service’s service name.
- Open a Command Prompt window.
- Type the following command and press OK.
sc query | findstr /i "cbdhsvc"
That shows the info you need.
- Open Notepad and paste these lines:
cmd.exe /c "echo off | clip" net stop cbdhsvc_5d696 net start cbdhsvc_5d696
Of course, you’ll have to replace
cbdhsvc_5d696
with the actual name of the Clipboard User Service as in your system. - Save the file as
clear_clipboard.bat
- When you want to clear the clipboard history, right-click on the batch file and click Run as administrator.
That’s it! Restarting the Clipboard User Service should have erased the Clipboard history. Open the clipboard history panel to check it out. The Pinned items in the clipboard will remain though.
Clipboard history Bonus Tips
Auto-paste to editor from the Clipboard history panel:
To open the Windows 10 new Clipboard history panel, you use the WinKey + V keyboard shortcut. When an item in the history list is clicked it’s copied to the clipboard automatically. Normally, many users simply use the clipboard history to copy an item from the history to the clipboard. Not many users know that the clipboard history panel also has the capacity to paste text to your active window as well.
If you have a text editor or Word processor open and active, press the WinKey + V button and select an item from the history. The item is automatically pasted to your editor window exactly at the current cursor position. It thus saves you one keystroke — i.e., you don’t need to click on the Paste button or press Ctrl + V on your editor.
The auto-paste feature works in the Run dialog as well.
Clear the legacy Clipboard history – for all versions of Windows:
To clear the legacy clipboard history in any version of Windows, create a desktop shortcut to the following command:
cmd.exe /c "echo off | clip"
The above command clears the current clipboard memory, and works in all versions of Windows, including Windows 10. However, in Windows 10, the command doesn’t erase the new Clipboard history data. It just clears the currently selected item from the memory.
Editor’s note: I’ve not tested the behavior with the clipboard cloud sync (“Sync across devices”) option enabled. So, I’m not sure if the batch file also clears the clipboard history in the cloud or not. If you want to clear the history from the cloud (in addition), it’s better to use the Settings UI.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
How do we do *BOTH* with 1 shortcut:
Get the ever-changing clipboard name.
Clear the full history of the clipboard.
@SusanSS: Create a batch file with the following lines:
Run the batch file as administrator.
Bravo – After hours trying to get an ahk script to clear my clipboard history, I decided to search the internet for Win10 Cmd Prompt syntax to do the job & then create a batch file with shortcut to do the job. Found your post and had the fix in minutes. now I can build an ahk function to run the batch cmd whenever I need to clear the clipboard history from within an ahk script. THANKS. 🙂