Resetting the Smart Card (PIV) Applet on Your YubiKey

Applicable Products


This article describes the two options for resetting the smart card (PIV) applet on your YubiKey. Warning: This will clear all of the smart card data and reset the applet to the factory defaults, including any certificates you have loaded. This does not impact any of the other applets on the YubiKey.

Option 1 - Using YubiKey Manager

  1. Download and install YubiKey Manager.
  2. Open Command Prompt as Administrator (Windows) or Terminal (Mac / Linux).
  3. Run: ykman piv reset
  4. When prompted, press Y and then Enter to confirm the reset.

Note: If you receive an error about not being able to find the program ykman, you will need to use cd to navigate to the folder it is in before running the ykman command. For example, on Windows you would run cd "C:\Program Files\Yubico\YubiKey Manager".

Option 2 - Using yubico-piv-tool

  1. Download and install YubiKey PIV Manager.
  2. Open Command Prompt as Administrator (Windows) or Terminal (Mac / Linux).
  3. Run the following series of commands:

yubico-piv-tool -averify-pin -P471112
yubico-piv-tool -averify-pin -P471112
yubico-piv-tool -averify-pin -P471112
yubico-piv-tool -averify-pin -P471112
yubico-piv-tool -achange-puk -P471112 -N6756789
yubico-piv-tool -achange-puk -P471112 -N6756789
yubico-piv-tool -achange-puk -P471112 -N6756789
yubico-piv-tool -achange-puk -P471112 -N6756789
yubico-piv-tool -areset
yubico-piv-tool -aset-chuid
yubico-piv-tool -aset-ccc

Note: If you receive an error about not being able to find the program yubico-piv-tool, you will need to use cd to navigate to the folder it is in before running the yubico-piv-tool command. For example, on Windows you would run cd "C:\Program Files\Yubico\YubiKey PIV Manager".

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.