映射网络驱动器和其他位置是将远程数据保存在局域网中的好方法(area network)。但是,在某些时候,您可能还想删除其中一些驱动器映射并仅保留您经常使用的那些。在本文中,我们将向您展示如何做到这一点。以下是从Windows 10(Windows 10)删除映射驱动器和网络位置的四种方法:
注意:(NOTE:)如果您在寻找在Windows 10中创建映射网络驱动器的方法而不是删除它们的方法时来到这里,请阅读:如何在Windows 10和Windows 8.1中映射(Windows 8.1)FTP位置、网络驱动器和 Web 共享。本指南适用于Windows 10,但我们展示的方法也适用于旧版本的Windows。
1. 使用文件资源管理(Explorer)器从Windows 10中删除映射的网络驱动器(network drive)
如果您需要删除以前创建的驱动器映射(drive mapping),您必须做的第一件事就是打开文件资源管理器(File Explorer)。然后,在窗口左侧,选择This PC。所有映射的驱动器都位于网络位置(Network Locations)组中,位于固态驱动器、硬盘驱动器和其他类似设备(如CD/DVD装置或USB 记忆(USB memory)棒)下方。
要删除指向网络位置的(network location)驱动器映射(drive mapping),请右键单击(或按住)它并选择断开连接(Disconnect)。
要删除指向网络文件夹或 FTP 站点的(network folder or FTP site)驱动器映射(drive mapping),请右键单击(或按住)它并选择删除(Delete)。
删除的映射驱动器然后停止显示。如果要恢复它们,则必须重新创建它们。
2. 在命令提示符或 PowerShell(Command Prompt or PowerShell)中运行“net use /delete ”以删除映射的网络驱动器(network drive)
如果您更喜欢命令行环境,可以使用net use命令从命令提示符(Command Prompt)或PowerShell中删除映射的网络驱动器。打开你最喜欢的那个并运行这个命令:net use [Mapped Drive Letter] /delete。然后,按Enter。例如,我们有一个分配了字母Z的(Z)驱动器映射(drive mapping),所以我们必须输入:net use Z: /delete。
您被告知映射的驱动器已成功删除,并且网络驱动器立即从(network drive)文件资源管理(File Explorer)器中消失。
注意:(NOTE:) net net use /delete命令仅适用于分配了字母的驱动器映射。它不适用于网络位置(network location)映射,例如FTP服务器或 Web 服务器。
3.在命令提示符或PowerShell(Command Prompt or PowerShell)中运行“net use * /delete”删除所有映射的网络驱动器
如果您配置了多个映射的网络驱动器(network drive)并且您想一次将它们全部删除,您可以使用相同的net use命令一次性断开它们。打开Powershell或启动命令提示符(Command Prompt)并运行以下命令:net use * /delete。
然后, PowerShell(PowerShell)或命令提示符(Command Prompt)会向您显示将要取消的所有活动网络连接。它还可能会询问您是否确定要继续。如果有,请输入Y,否则,请输入N。
提示:(TIP:)如果您想使用net use命令删除所有映射的网络驱动器,并且您想强制该过程继续进行而不要求任何确认,请在命令中添加/y参数:net use * /delete /y .
4. 使用文件资源管理器(Explorer)通过删除其快捷方式从您的 PC中删除网络位置映射(network location mapping)
网络位置映射(network location mapping)是作为文件存储在Windows 计算机(Windows computer)上的快捷方式。如果您使用我们展示的第一种方法无法删除它,您可以尝试其他方法。其中之一是使用文件资源管理器(File Explorer)删除其快捷方式。打开文件资源管理器并导航(Open File Explorer and navigate)到"C:\Users\Your_User_Name\AppData\Roaming\Microsoft\Windows\Network Shortcuts"。Your_User_Name是您的 Windows 10 用户帐户的名称。在Network Shortcuts文件夹中,您可以找到所有网络位置(network location)映射。选择您不再想使用的那些。然后,右键单击(或按住)它们并选择Delete或按Delete键盘上的键。
选定的网络映射将立即删除,无需额外确认。
(Troubleshoot network)对不会消失的网络驱动器和位置进行故障排除
有时我们上面描述的任何方法都不能正常工作。当这种情况发生时,您应该尝试以下几件事:
- 如果您断开映射的网络驱动器(network drive)或删除网络位置(network location),但它没有从文件资源管理器(File Explorer)中消失,原因可能是文件资源管理器(File Explorer)没有刷新其内容。尝试按键盘上的F5键keyboard or click/tapFile Explorer内右键菜单中的Refresh。
- 如果您尝试从 Windows 10 PC 中删除网络映射,但收到有关该位置不再可用的错误消息,则您的Windows 操作系统(Windows operating)可能已过时。我们已经测试了当具有映射网络驱动器和位置的 PC 与网络断开连接或网络资源不再可用(目标设备已关闭或不再是网络的一部分)时会发生什么,以及所有本文中说明的方法正常工作。
- 有时,即使您从Windows PC断开或删除了(Windows PC)网络驱动器或位置(network drive or location),操作系统(operating system)也会挂起并且无法即时删除这些链接。在这种情况下,一个好主意是重新启动Windows 10。您还可以使用Powershell或命令提示符来重新启动(Command Prompt)explorer.exe进程,以运行以下两个命令:taskkill /f /IM explorer.exe和explorer.exe。
您(Did)是否设法删除了您想要的所有映射网络驱动器?
正如您从本文中看到的那样,删除驱动器映射有很多替代方法。以上说明适用于任何Windows 10 计算机或设备(computer or device)。您(Did)是否设法删除了您想要的每个映射的网络驱动器或位置(mapped network drive or location)?如果您有什么要添加到我们的指南中,请不要犹豫,使用下面的评论。
How to delete a mapped network drive from Windows (5 ways)
Mаpрing nеtwork driνeѕ and other locations on your Windows laptop or computer is a good wаy of keeping remote datа at hand in your local area network. However, at some point, you might also want to delеte some of these drive mappings and keep only thoѕе that you regularlу use. In this article, wе show you exactly how to do that. Here are fivе mеthods for deleting mapped drives and network locations from Windowѕ 10 or Windows 11:
1. How to delete a mapped network drive from Windows 10 using File Explorer
If you’re using Windows 10 and you need to delete a previously created drive mapping, the first thing you must do is open File Explorer. Then, on the left side of the window, select This PC. All of the mapped drives are available in the Network Locations group, beneath your solid-state drive, hard-disk drives, and other similar devices such as CD/DVD units or USB memory sticks.
The mapped network drives are shown in File Explorer
To delete a drive mapping toward a network location, right-click (or press-and-hold) on it and select Disconnect.
Disconnect a mapped network drive from Windows 10
To remove a drive mapping towards a network folder or FTP site, select it and press Delete on your keyboard. Alternatively, you could also right-click (or press-and-hold) on it and choose Delete in the context menu.
Delete a network location from Windows 10
The deleted mapped drives then stop showing. If you want to restore them, you have to recreate them, using this guide: How to map FTP drives, network drives, and web shares, in Windows 10.
2. How to delete a mapped network drive from Windows 11 using File Explorer
The steps to remove a network drive from Windows 11 using File Explorer are similar to the ones in Windows 10. Start by opening File Explorer (Windows + E) and, on the navigation section from the left of the window, select This PC. Then, you’ll see all your mapped network drives listed under Network Locations.
Mapped network drives are listed in Windows 11's File Explorer
To unmap a network drive from Windows 11, select it, click or tap on the … (See more) button from the top toolbar, and press “Disconnect network drive” from the menu displayed.
How to remove a mapped network drive from Windows 11
Alternatively, you can also use File Explorer’s context menus to remove a network drive from Windows 11. First, right-click or press-and-hold on the mapped network drive that you want to disconnect and select “Show more options.”
Show more options in the context menu
Then, in the expanded context menu shown, select Disconnect to remove the mapped network drive.
Disconnect a network drive from Windows 11
If what you wanted was to delete a network location mapped towards a network folder or FTP site, things couldn’t be simpler. Select it, and either press Delete on your keyboard or the Delete button from the top toolbar of File Explorer. Alternatively, you can also right-click (press-and-hold) on the network location and click or tap Delete in the context menu.
How to remove a network location from Windows 11
Once you delete a mapped drive or network location, File Explorer no longer displays it. If you want them back, you’ll have to recreate them using this tutorial: How to map network drives and add FTP locations in Windows 11.
3. How to unmap a network drive in Command Prompt, PowerShell, or Terminal with the “net use /delete” command
If you prefer command-line environments, you can use the net use command to delete mapped network drives. Net use works in Command Prompt, PowerShell, and also in the new Terminal app, both in Windows 10 and Windows 11. Open CMD or the command-line interface you like best and run this command:
For example, I had a drive mapping to which I assigned the letter Z, so the command I needed to run to unmap the drive was:
Using the net use /delete command to remove a mapped network drive
Once you run the net use /delete command, you are informed that the mapped drive has been deleted successfully, and the network drive disappears immediately from File Explorer.
IMPORTANT: The net use /delete command only works for drive mappings that have a letter assigned. It doesn’t work for network location mappings such as FTP servers or web servers.
4. How to delete all mapped network drives with the “net use /delete” command
If you have more than one mapped network drive configured and you want to delete them all at once, you can use the same net use command to disconnect them all at once. Open Powershell, Windows Terminal, or start Command Prompt and run the following command:
Running the net use * /delete command to remove all the mapped network drives
CMD (or, depending on what you're using, Windows Terminal or PowerShell) then shows you all the active network connections that are going to be canceled. It might also ask whether you are sure that you want to continue. Type in Y if you do, or N if you don’t.
Typing Y to confirm the removal of all the mapped network drives
TIP: If you want to use the net use to disconnect all the mapped network drives, and you want to force the process to go on without asking for any confirmations, add the /y parameter to the command, like this:
5. How to remove a network location (FTP, web server) from Windows by erasing its shortcut
A network location mapping is a shortcut stored as a file on your Windows computer. If you can’t delete it using the first method we’ve shown, you can try others. One of them is to use File Explorer to delete its shortcut. Open File Explorer and navigate to
which is the same as
… where Your_User_Name is the name of your Windows user account.
The Windows folder where network location shortcuts are saved
In the Network Shortcuts folder, you can find all network location mappings. Select the ones you no longer want to use. Then, if you’re using Windows 10, right-click (or press-and-hold) on them and select Delete or press the Delete key on your keyboard.
How to unmap a network location by deleting its shortcut from Windows 10
In case you’re using Windows 11, select the network location(s) you want to unmap, and then press Delete on your keyboard. Alternatively, you can also right-click (or press-and-hold) on the network locations and select Delete in the context menu.
How to unmap a network location by deleting its shortcut from Windows 11
Regardless of whether you’re using Windows 11 or Windows 10, the selected network mappings are deleted immediately, without additional confirmation.
Troubleshoot network drives and locations that won’t go away
There are times when none of the methods we described above work as they should. What if you just cannot remove a disconnected network drive from Windows 10 or Windows 11? How do you unmap a drive in Windows in such a situation? Well, if you stumble upon such an issue, here are a few things you could try to disconnect and delete mapped drives:
- If you disconnect a mapped network drive or delete a network location, but it doesn’t disappear from File Explorer, the reason might be that File Explorer didn’t get to refresh its contents. Try pressing the F5 key on your keyboard or click/tap on Refresh in the right-click menu inside File Explorer.
- If you tried to remove a network mapping from your Windows 10 or Windows 11 PC, but you get an error about that location no longer being available, your Windows operating system is likely outdated. We’ve tested to see what happens when the PC with the mapped network drives and locations is disconnected from the network or when the network resources are no longer available (target devices are shut down or are no longer part of the network), and all the methods illustrated in this article worked correctly.
- Sometimes, even though you disconnected or deleted a network drive or location from your Windows PC, the operating system hangs and doesn’t remove these links on the fly. A good idea in such a situation would be for you to restart Windows. You can also restart the explorer.exe process by using Terminal, Powershell, or Command Prompt to run these two commands, one after the other:
Using taskkill to stop and then restart the explorer.exe process
Did you manage to remove all the mapped network drives you wanted?
As you can see from this article, there are quite a few alternatives to deleting drive mappings. The instructions above work on any Windows computer or device. Did you manage to delete every mapped network drive or location you wanted? If you have something to add to this guide, don’t hesitate to let me know in the comments section below.