When you want to remove network drives from your Windows 10 or 11 computer you could use explorer. Another option is to use the Net Use command. This way you can remove all network connections easily with a single command on your own computer a remove one.
In this article, I will explain how you can use the Net Use Delete
command to remove a single, or all network connections.
Net Use Delete
Before we are going to remove the network connections, let’s first take a look at the existing network connections on our computer with Net Use. You can use the Net Use command in Command Prompt or in Windows PowerShell.
To list all existing connections type:
1. Net use

Remove a single network connection
To remove a single network connection with net use we can type net use x: /delete
. Where x: is the drive letter of the network drive that you want to remove:
1. Net use x: /delete 2. 3. # or in short 4. net use x: /d
Delete Network Connection without a drive letter
On some occasions, you might have a network connection without a drive letter. These connections can also be removed with the net use command. Instead of using the drive letter we then have to use the remote path.
So the remove the drive mapping to \\LT3452\C$\temp from the above screenshot we can use the following command:
1. net use \\LT3452\c$\temp /delete

Net Use Delete All
It’s also possible to delete all active network connections from a computer. For this, we can use the command net use * /delete
.
1. net use * /delete 2. 3. # or in short: 4. net use * /d
Net use * /delete Force
When you run the delete command with the wildcard to delete all connections, you will be prompted to confirm the deletion. To force the delete command we can add the parameter /yes
to it to delete the network connections silently:
1. # Force delete of all network connections 2. net use * /delete /yes 3. 4. # or in shot: 5. net use * /d /y
Wrapping Up
The net use delete command is really useful when you want to clean up network connections on a computer with a script or before you apply new network connections. If you want to learn more about the command net use, then make sure you read this article where I explain more about it.
If you have any questions, just drop a comment below!