sodcalculator

10 Tech How-To

Clear Mapped Network Drive Cache in Windows 10

Guide 10-33638 · Updated · Step by step

If you work with mapped network drives in Windows 10, you’ve probably seen the frustration of a folder showing stale files, or a drive that won’t reconnect after the network changed. This happens because Windows caches the drive’s connection and directory listings. Clearing that cache forces Windows to rebuild the connection from scratch, which fixes most mapping glitches. This guide walks you through the exact steps to flush the cache, remove lingering credentials, and get your mapped drives working again. No special tools or admin rights are required for most steps, though a couple do need an administrator account.

What You’ll Need

  • An account with administrator privileges (for two of the steps, but try the user-level ones first).
  • The exact UNC path of the network share (e.g., \\server\share) – you can find it in the properties of the mapped drive.
  • Optional: the IP address of the server if you suspect DNS issues.

Step-by-Step

  1. Close all programs that use the mapped drive. This includes File Explorer windows, Office documents, and any backup or sync tools. If a program holds the connection open, clearing the cache may fail or cause errors.
  2. Disconnect the mapped drive. Open File Explorer, right-click the mapped drive under “This PC,” and select “Disconnect.” If you get an error saying the drive is in use, close more programs and try again. You can also open a Command Prompt and type net use * /delete /y to remove all mapped drives at once.
  3. Clear the credential cache. Open the Start menu, type “Credential Manager,” and press Enter. Under “Windows Credentials,” look for any entries that mention your server name or IP address (they often start with TERMSRV or MicrosoftAccount). Click the arrow next to each one and select “Remove.” This clears stored passwords that might be causing the drive to authenticate with old credentials.
  4. Flush the DNS resolver cache. This step helps if the server’s IP address has changed. Open Command Prompt as administrator (right-click Start > “Command Prompt (Admin)” or “Windows PowerShell (Admin)”). Type ipconfig /flushdns and press Enter. You should see the message “Successfully flushed the DNS Resolver Cache.”
  5. Clear the File Explorer network cache (optional but often needed). Open File Explorer, click the “View” tab, then “Options” (or “Folder and search options”). Under the “General” tab, in the “Privacy” section, click “Clear” next to “Clear File Explorer history.” This removes the list of recently accessed network locations.
  6. Reboot the workstation. A full restart clears all temporary network state, including the SMB session that Windows may still hold. This is the single most effective step if you’ve been fighting a stubborn drive.
  7. Reconnect the mapped drive. After reboot, open File Explorer, right-click “This PC,” and select “Map network drive.” Choose a drive letter, enter the UNC path, and check “Reconnect at sign-in.” If you need different credentials than the current user, check “Connect using different credentials.” Click “Finish.”
  8. Verify the connection. Open the drive and confirm you see the latest files. If it still shows old content, press F5 to refresh, or restart File Explorer via Task Manager (right-click the taskbar, select “Task Manager,” find “Windows Explorer,” right-click it, and choose “Restart”).

Common Mistakes

  • Skipping the reboot. Many users disconnect and reconnect without restarting, but the old SMB session can linger in the background. The reboot is what actually clears the kernel-level network state.
  • Only clearing the DNS cache. DNS is only one part of the puzzle. If the server name resolves correctly, flushing DNS won’t help with stale file listings.
  • Forgetting to remove old credentials. If you changed your password or the server’s share permissions, the old stored credential in Credential Manager will keep failing silently.
  • Mapping with the same drive letter while the old connection is still active. Windows may just reuse the cached connection instead of creating a new one. Always disconnect first.
  • Not closing all programs. A file open from the network drive will lock the connection, and the disconnect step will fail or leave a zombie session.

Tips

  • Use the UNC path instead of an IP address when mapping. If the server’s IP changes, the name will still resolve correctly (after DNS updates).
  • If you regularly have this issue, consider using a Group Policy or a logon script to map drives automatically. That way, each login starts with a fresh connection.
  • Keep your network driver and Windows updates current. Many mapping issues are fixed by cumulative updates from Microsoft.
  • If you’re on a laptop, make sure you’re connected to the right network (VPN or office) before mapping. Windows will cache the connection to an unreachable server and show a red X.

Troubleshooting

The drive still shows old files after following all steps. This is rare but possible if a program is still running that has an open handle to the drive. Use Task Manager to end any processes that might be using the network, especially backup agents or cloud sync tools. You can also check with net use in Command Prompt to see if any connections remain – if so, delete them with net use * /delete /y.

You get “Access denied” when reconnecting. This usually means the credentials you’re using are wrong or the share permissions have changed. Open Credential Manager again and double-check that you removed the old entry. Then map the drive with “Connect using different credentials” and enter the correct username and password. If you’re on a domain, make sure you use DOMAIN\username format.

The drive maps but disappears after reboot. This is a sign that the “Reconnect at sign-in” checkbox wasn’t checked, or that Windows is starting before the network is ready. To fix the second issue, open Task Scheduler and create a basic task that runs at logon with a short delay (e.g., 30 seconds) and runs net use Z: \\server\share /persistent:yes.

Flushing DNS didn’t help. If the server name still resolves to an old IP, try ipconfig /registerdns after flushing. If that fails, check your hosts file (C:\Windows\System32\drivers\etc\hosts) for any manual entries that might be overriding DNS.

You can’t delete a credential because it’s in use. Sign out of all accounts that might be using it, or restart the computer and try again before opening any network locations.

Frequently Asked Questions

Will clearing the cache delete any of my files?

No. The cache only stores connection metadata and directory listings. Your files remain on the server untouched.

Do I need to be an administrator to clear the mapped drive cache?

Most steps (disconnecting, clearing credentials, rebooting) work as a standard user. Only the DNS flush command requires administrator privileges.

How often should I clear the mapped drive cache?

Only when you encounter problems like stale listings, connection errors, or authentication failures. There’s no need to do it on a schedule.

Why does my mapped drive show a red X but still works?

That usually means Windows lost the connection temporarily but reconnected on demand. The red X is cosmetic and often disappears after a refresh or when you click the drive.

Can I clear the cache without rebooting?

Yes, you can restart File Explorer or use the net use command to delete and recreate the connection, but a reboot is the most thorough way to clear all network state.

Will this fix slow performance on the mapped drive?

Not usually. Slow performance is more likely due to network bandwidth, server load, or large file transfers. Clearing the cache only fixes stale or broken connections.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →