Mapping a network drive is one of the most convenient ways to create a shortcut or link to a shared resource on your Windows system. The mapped drive shows up under Network locations inside This PC on your File Explorer. You can also share a folder from your system and map it to a drive for easier access.
However, if you no longer need such a shortcut, it only creates more branches on your network locations. Additionally, if you have multiple network drives, it can be complicated to track which drive links to which folder.
In such scenarios, it’s better to delete the drive network drive. There are many ways to do so on the Windows system, which we have provided in this guide.
How to Delete Mapped Network Drive on Windows
Below mentioned are the different ways to delete a mapped network drive on Windows. You can pick and use any one of them.
Through File Explorer
The usual way to delete a mapped network drive on Windows is through the file explorer. Here are the necessary steps:
- Press Win + E to open File Explorer.
- Go to This PC.
- Click on the three-dot icon from the menu bar.
- Choose Disconnect network drive.
- If you have only one network drive, it will disconnect or delete it. If you have more, it shows you a list of the drives.
- Select the one you wish to delete and click OK.
You can also right-click on the network drive under Network locations and select Disconnect or Show more options > Disconnect.
If you have mapped a network location instead of a drive, it shows up as a folder in this group. To remove it, you need to right-click on it and select Delete or Show more options > Delete.
Using Command-line Interface
You can also use the command-line interfaces like Command Prompt and Windows PowerShell to delete a mapped drive. They use separate default commands, but you can also use the Command Prompt’s command with PowerShell.
Here’s how you can use the two CLIs to delete a mapped network drive on Windows:
Command Prompt
- Open Run by pressing Win + R.
- Type
cmd
and press Enter to open Command Prompt. - Type
net use
and press Enter to list out all mapped network drives. - Enter the command
net use <Drive Letter> /delete
ornet use <Drive Letter> /d
. For example,net use Y: /d
If you want to delete all mapped network drives, enter the command net use * /d
and then, type Y
and press Enter to confirm.
Windows PowerShell
- Press Win + R to open Run.
- Type
powershell
and press Enter to open Windows PowerShell. - If you have PowerShell 7, it’s better to use this CLI instead. You can open it by entering
pwsh
on Run - Enter
Get-SmbMapping
to list all mapped drives. - Enter
Remove-PSDrive -Name <Drive Letter without colon>
- Then, enter
Get-SmbMapping
again to check if the drive is gone. If not, enterRemove-SmbMapping <Drive Letter with colon>
and then, restart your PC.
With Registry Editor
It is also possible to disconnect the mapped drives by deleting the registry entries related to the drive. First, back up your registry to account for system issues due to unintentional changes.
Then, follow the instructions below to delete mapped drives using the Registry Editor:
- Open Run and enter
regedit
to open the Registry Editor. - Navigate to
Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoints2\
- On the navigation pane on the left side, you should see the mapped network drives inside the MountPoints2 key.
- Right-click on the drive you want to remove and select Delete.
- Confirm with Yes.
- Then, Navigate to
Computer\HKEY_CURRENT_USER\Network
- This key should contain the registry keys for all the network drives.
- Select the key for the drive you wish to remove and press Delete.
- Click Yes to confirm.
Restart your PC to delete the mapped drive.
From Network Shortcuts
You can also delete your mapped network locations or folders from within the Network Shortcuts directory. This method only deletes the mapped folders and not the mapped drives.
Here’s how you can do it:
- Open Run and enter
%AppData%\Microsoft\Windows\Network Shortcuts
. It opens this location on the file explorer. - Select the network folder’s shortcut inside the folder and press Delete. You can also press Ctrl + Shift + Delete if you want to delete it permanently.
Troubleshooting Can’t Delete Mapped Network Drive
If you can’t delete the mapped network drive using any of the above methods, it’s likely that there’s some temporary issue in the Windows Explorer app. This may happen if you are running many tasks that use this process.
First, try refreshing by pressing Ctrl + R or F5 inside This PC. If the drive is still present you need to restart Windows Explorer. To do so,
- Press Ctrl + Shift + Esc to open the Task Manager.
- Go to the Details tab.
- Click on
explorer.exe
and select End Task. - Click on File on the menu bar and select Run new task.
- Type
explorer.exe
and press Enter.
Check if the drive is gone. If not, try deleting it again.
We also recommend updating your Windows OS to the latest version to prevent any outdated OS issues from hindering this process.