Apple Keychain在保护(Apple Keychain)Mac上网站、应用程序和无线网络的登录信息方面做得非常出色。它甚至可以通过在 iCloud 上同步数据来实现跨(syncing data over iCloud)Apple设备的无缝密码自动填充体验。
但是当您继续使用Mac时,您可能会遇到要求您从默认登录钥匙串中删除密码的情况。在某些情况下,您甚至可能必须重置钥匙串并重新开始。
当您想在 macOS中删除钥匙串密码时(Your Keychain Passwords)
在开始之前,最好先了解需要您在Mac上删除登录钥匙串中的单个或所有密码的特定场景。
您无法保存或自动填写密码(You Have Trouble Saving or Auto-Filling Passwords)
您在保存或自动填充密码时不断遇到钥匙串问题。(Keychain)搜索和删除有问题的登录条目(deleting the offending login entries)会有所帮助。但如果问题一直出现,您可能应该重置默认钥匙串。
您想将 Mac 交给其他人(You Want to Hand Over Your Mac to Someone Else)
您想将Mac长期交给其他人。如果无法创建单独的用户帐户,删除密码有助于保护隐私并防止访问网站和应用程序。
注意(Note):您想出售您的Mac吗?您必须将 macOS 设备重置为出厂默认设置(reset your macOS device to factory defaults)。
您忘记了登录钥匙串的密码(You’ve Forgotten the Password to the Login Keychain)
默认情况下,您的登录钥匙串使用 Mac 的管理员密码来加密其内容。因此,如果您忘记并使用新密码重置 Mac 帐户,(reset your Mac account with a new password)除非您记住旧密码,否则您将无法访问或使用当前的登录钥匙串。完整的钥匙串重置是重新开始保存密码的唯一方法。
您已切换到其他密码管理器(You’ve Switched to a Different Password Manager)
尽管将Keychain集成到Mac很方便,但您可能更喜欢替代的跨平台密码管理实用程序,例如1Password、LastPass 或 Dashlane(1Password, LastPass, or Dashlane)。切换后,如果您不喜欢将密码保存在多个位置,请重置您的登录钥匙串。
可选:禁用 iCloud 钥匙串
如果您已将钥匙串(Keychain)设置为通过 iCloud 同步密码,您可能需要在开始之前禁用 iCloud钥匙串(Keychain)。否则,在 macOS 中删除您的密码也将导致它们从您拥有的其他Apple设备中自动删除。
1. 打开系统偏好设置(System Preferences)应用程序。如果在Dock(Dock)上找不到它,请打开Apple菜单并选择系统偏好设置(System Preferences)。
2. 选择Apple ID。
3. 在侧边栏选择iCloud。然后,取消选中Keychain(Keychain)旁边的框。
使用 Safari 密码管理器删除网站密码(Delete Website Passwords Using Safari Passwords Manager)
如果您只想删除网站密码,最方便的方法是使用 Safari 的集成密码(Passwords)管理器。您还可以使用它将密码导出到CSV文件(如果您想备份密码或将它们导入到不同的密码管理器,这是理想的选择)。
1. 打开Safari并选择菜单栏上的Safari >首选项。(Preferences)
2. 切换到密码(Passwords)选项卡。
提示:在(Tip)Safari中访问密码(Passwords)管理器的另一种方法是在系统偏好设置(System Preferences)应用程序中选择密码(Passwords)类别。
3. 在密码字段中输入您的Mac用户帐户密码或使用 Touch ID 进行身份验证。
4. 选择窗口左下角的更多图标(三个点),然后选择(More)导出密码(Export Passwords)。
5. 在您的Mac上选择一个位置以将您的密码导出到CSV文件,然后选择保存(Save)。
6. 您现在可以删除您的密码:
删除个人密码(Delete Individual Passwords):突出显示您要删除的密码并选择删除(Delete )( – ) 图标。如果您有很多密码,请使用侧边栏顶部的搜索栏按用户名或网站搜索登录条目。(Search)
删除多个密码(Delete Multiple Passwords):按住Command键可选择侧边栏上的多个登录条目。然后,选择删除(Delete)以同时删除它们。
删除所有密码(Delete All Passwords):如果要删除所有已保存的网站密码,请按Command + A突出显示整个侧边栏。然后,按Delete键并选择Delete Passwords作为确认。
注意:您可以随时从(Note)CSV文件中恢复已删除的密码,方法是在 Safari 的密码管理器中选择更多(More)>导入密码。(Import Passwords)
使用钥匙串访问删除任何已保存的密码(Delete Any Saved Password Using Keychain Access)
如果要从登录钥匙串中删除网站、应用程序、Wi-Fi网络和加密磁盘映像的密码,则必须使用macOS中内置的钥匙串访问应用程序。(use the built-in Keychain Access app)如果您尚未在 Mac 上设置 Time Machine(set up Time Machine on your Mac),我们建议您在继续之前手动备份您的钥匙串。
注意(Note):如果要删除Mac上的所有密码,最好的选择是重置登录钥匙串。跳至(Skip)下一部分以获取说明。
备份您的登录钥匙串(Back Up Your Login Keychain)
1. 按住 Control 键单击或右键单击Finder图标并选择Go to Folder。
2. 输入以下文件夹路径并按Enter:
~/Library/Keychains
3. 创建login.keychain-db文件的副本到您(login.keychain-db)Mac上的不同位置。
删除登录钥匙串中的密码(Delete Passwords in Login Keychain)
1. 通过Launchpad(Launchpad) > Other > Keychain Access打开 Keychain Access 。或者,使用Finder访问(Finder)Applications文件夹,然后双击Utilities文件夹中的Keychain Access。
2. 在侧边栏的默认钥匙串(Default Keychains)部分下选择您的登录钥匙串。它由两个类别组成——登录(Login)和本地项目( Local Items)。
登录(Login):包含您无法通过 iCloud 同步的条目。
本地项目(Local Items):包含您可以通过 iCloud 同步的条目。如果钥匙串正在通过 iCloud 主动同步,您会在钥匙串访问侧栏中看到列为iCloud的类别。(iCloud)
3. 您现在可以开始删除您的密码:
删除个人密码(Delete Individual Passwords):按住 Control 键单击或右键单击要删除的密码,然后选择删除项目(Delete Item)。使用窗口右上角的搜索栏按用户名、网址、网络名称等搜索登录条目。(Search)
删除多个密码(Delete Multiple Passwords):在选择要删除的登录条目时按住Command键。(Command)然后,按住 Control 键单击任何突出显示的项目并选择Delete X Items。
4. 选择删除(Delete)确认。
使用钥匙串访问重置我的默认钥匙串(Default Keychain Using Keychain Access)
如果您想删除网站、应用程序和Wi-Fi网络的所有密码,Mac 的Keychain Access应用程序为您提供了重置默认登录钥匙串的选项。如果您忘记了它的密码(例如,在管理员密码重置之后)或想要解决与损坏的钥匙串有关的问题,这是理想的选择。
重置您的登录钥匙串将自动生成现有数据的备份副本,您可以稍后将其添加到钥匙串(Keychain)(例如,如果您记住其密码),如果您愿意。
注意(Note):钥匙串急救(Keychain First Aid)选项不再出现在Mac OS X 10.11和更高版本中。
1. 打开Keychain Access应用程序,然后在菜单栏上选择Keychain Access > Preferences 。
2. 选择重置默认钥匙串(Reset Default Keychains)。
3.在Keychain Access弹出窗口中选择Use Password以使用 Mac 的管理员密码验证操作。(Use Password)或者,使用 Touch ID(use Touch ID)。
4. 再次输入您的Mac管理员密码以加密新的登录钥匙串,然后选择OK。
5. 选择确定(OK)以完成重置过程。
6.如果您想使用不同的登录钥匙串密码,请打开编辑(Edit)菜单并选择更改钥匙串密码。(Change Password for Keychain)或者,选择钥匙串访问(Keychain Access)>退出钥匙串访问(Quit Keychain Access)。
注意(Note):如果要添加旧登录钥匙串的内容,请在钥匙串访问(Keychain Access)菜单栏上选择文件(File)>导入钥匙串。(Import Keychain)您将在 ~/Library/Keychains目录下找到自动数据库备份。
从钥匙串访问中删除自定义钥匙串(Delete Custom Keychain From Keychain Access)
如果您在Mac上使用自定义钥匙串,则可以删除其中类似于登录钥匙串的任何项目。您还可以选择完全移除钥匙串本身。
1. 从钥匙串访问应用程序的(Keychain Access)自定义钥匙串(Custom Keychains)部分选择钥匙串。
2.在菜单栏上选择文件(File)>删除钥匙串。(Delete Keychain)
3. 选择删除参考(Remove Reference)或删除钥匙串文件(Delete Keychain File )选项。
删除引用(Remove Reference):仅删除对Keychain Access中自定义钥匙串的引用。您始终可以通过选择菜单栏上的文件(File)>添加钥匙(Add Keychain)串来重新添加钥匙串。
删除钥匙串文件(Delete Keychain File):删除钥匙串数据库文件。如果您没有在Mac上设置Time Machine,您可能需要在选择此选项之前将文件备份到其他位置。您可以在~/Library/Keychains目录下找到它。
包起来
如您所见,您有多种方法可以删除Keychain中的密码。在继续之前,请务必备份您的密码。(Always)如果您稍后改变主意,您可以选择检索您的登录详细信息。
How to Delete All Your Keychain Passwords in macOS (Reset Keychain)
Apple Keychain does a terrific job of keeping the login info for websites, applications, and wireless networks secure on your Mac. It even allows for a seamless password auto-filling experience across Apple devices by syncing data over iCloud.
But as you keep using your Mac, you may run into instances that require you to delete passwords from your default login keychain. You may even have to reset the keychain and start all over in some cases.
When You Would Want to Delete Your Keychain Passwords in macOS
Before you start, it’s a good idea to go through specific scenarios that require you to delete individual or all passwords in your login keychain on the Mac.
You Have Trouble Saving or Auto-Filling Passwords
You keep encountering issues with Keychain while saving or auto-filling passwords. Searching for and deleting the offending login entries can help. But if the problem occurs all the time, you should probably reset the default keychain.
You Want to Hand Over Your Mac to Someone Else
You want to hand over your Mac to someone else for an extended period. If creating a separate user account is out of the question, deleting your passwords helps preserve privacy and prevents access to websites and apps.
Note: Are you looking to sell your Mac? You must reset your macOS device to factory defaults instead.
You’ve Forgotten the Password to the Login Keychain
By default, your login keychain uses your Mac’s admin password to encrypt its contents. So if you forget and reset your Mac account with a new password, you won’t be able to access or use your current login keychain unless you remember your old password. A complete keychain reset is the only way to start saving passwords again.
You’ve Switched to a Different Password Manager
Despite the convenience of having Keychain integrated into your Mac, you may prefer an alternative cross-platform password management utility such as 1Password, LastPass, or Dashlane. After making the switch, reset your login keychain if you don’t like keeping passwords in multiple locations.
Optional: Disable iCloud Keychain
If you’ve set up Keychain to sync passwords over iCloud, you may want to disable iCloud Keychain before you begin. If not, deleting your passwords in macOS will also result in their automatic removal from other Apple devices you own.
1. Open the System Preferences app. If you can’t find it on the Dock, open the Apple menu and select System Preferences.
2. Select Apple ID.
3. Select iCloud on the sidebar. Then, uncheck the box next to Keychain.
Delete Website Passwords Using Safari Passwords Manager
If you only want to delete website passwords, the most convenient way to do that is to use Safari’s integrated Passwords manager. You can also use it to export passwords to a CSV file (ideal if you want to back up your passwords or import them to a different password manager).
1. Open Safari and select Safari > Preferences on the menu bar.
2. Switch to the Passwords tab.
Tip: Another way to access the Passwords manager in Safari is to select the Passwords category inside the System Preferences app.
3. Enter your Mac user account password into the password field or authenticate yourself using Touch ID.
4. Select the More icon (three dots) at the lower-left corner of the window and choose Export Passwords.
5. Pick a location on your Mac to export your passwords to a CSV file and select Save.
6. You can now delete your passwords:
Delete Individual Passwords: Highlight the password you want to remove and select the Delete (–) icon. If you have lots of passwords, use the Search bar at the top of the sidebar to search for login entries by username or website.
Delete Multiple Passwords: Hold down the Command key to select multiple login entries on the sidebar. Then, select Delete to remove them simultaneously.
Delete All Passwords: If you want to delete all saved website passwords, press Command + A to highlight the entire sidebar. Then, press the Delete key and select Delete Passwords as confirmation.
Note: You can restore deleted passwords from the CSV file at any time by selecting More > Import Passwords in Safari’s Passwords manager.
Delete Any Saved Password Using Keychain Access
If you want to delete passwords of websites, apps, Wi-Fi networks, and encrypted disk images from your login keychain, you must use the built-in Keychain Access app in macOS. If you’ve yet to set up Time Machine on your Mac, we recommend backing up your keychain manually before proceeding.
Note: If you want to delete all passwords on your Mac, your best option is to reset the login keychain. Skip ahead to the next section for instructions.
Back Up Your Login Keychain
1. Control-click or right-click the Finder icon and select Go to Folder.
2. Type in the following folder path and press Enter:
~/Library/Keychains
3. Create a copy of the login.keychain-db file to a different location on your Mac.
Delete Passwords in Login Keychain
1. Open Keychain Access via Launchpad > Other > Keychain Access. Or, visit the Applications folder using Finder and double-click Keychain Access inside the Utilities folder.
2. Select your login keychain under the Default Keychains section of the sidebar. It consists of two categories—Login and Local Items.
Login: Contains entries that you can’t sync over iCloud.
Local Items: Contains entries that you can sync via iCloud. If the keychain is actively syncing via iCloud, you’ll see the category listed as iCloud on the Keychain Access sidebar.
3. You can now start deleting your passwords:
Delete Individual Passwords: Control-click or right-click the password you want to remove and select Delete Item. Use the Search bar at the top right of the window to search for login entries by username, web address, network name, etc.
Delete Multiple Passwords: Hold down the Command key while selecting the login entries you want to remove. Then, control-click any of the highlighted items and select Delete X Items.
4. Select Delete to confirm.
Reset My Default Keychain Using Keychain Access
If you want to delete all passwords for websites, apps, and Wi-Fi networks, the Mac’s Keychain Access app provides you the option to reset the default login keychain. That’s ideal if you forget its password (e.g., after an admin password reset) or want to resolve issues with a corrupt keychain.
Resetting your login keychain will automatically generate a backup copy of the existing data that you can add to Keychain later (e.g., if you remember its password) if you want.
Note: The Keychain First Aid option is no longer present in Mac OS X 10.11 and later.
1. Open the Keychain Access app and select Keychain Access > Preferences on the menu bar.
2. Select Reset Default Keychains.
3. Select Use Password on the Keychain Access pop-up to authenticate the action with your Mac’s admin password. Or, use Touch ID.
4. Enter your Mac admin password again to encrypt the new login keychain and select OK.
5. Select OK to complete the reset process.
6. Open the Edit menu and select Change Password for Keychain if you want to use a different login keychain password. Or, select Keychain Access > Quit Keychain Access.
Note: If you want to add the contents of the old login keychain, select File > Import Keychain on the Keychain Access menu bar. You’ll find the automatic database backup under the ~/Library/Keychains directory.
Delete Custom Keychain From Keychain Access
If you use a custom keychain on your Mac, you can delete any item inside similar to the login keychain. You also have the option of completely removing the keychain itself.
1. Select the keychain from the Custom Keychains section of the Keychain Access app.
2. Select File > Delete Keychain on the menu bar.
3. Select the Remove Reference or the Delete Keychain File option.
Remove Reference: Removes only the reference to the custom keychain in Keychain Access. You can always re-add the keychain by selecting File > Add Keychain on the menu bar.
Delete Keychain File: Deletes the keychain database file. If you don’t have Time Machine set up on your Mac, you may want to back up the file to a different location before selecting this option. You can find it under the ~/Library/Keychains directory.
Wrapping Up
As you just saw, you have several approaches to deleting passwords in Keychain. Always create a backup of your passwords before you go ahead. That gives you the option of retrieving your login details if you change your mind later.