Net Use Delete – How to Remove Network Connections

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:

Net use
net use delete
List existing connections with 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:

Net use x: /delete

# or in short
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:

net use \\LT3452\c$\temp /delete
net use delete all

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.

net use * /delete

# or in short:
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:

# Force delete of all network connections
net use * /delete /yes

# or in shot:
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!

Leave a Comment

0 Shares
Tweet
Pin
Share
Share