Fix: ‘Profile not Deleted Completely’ Error on Windows 10

Some Windows 10 users are reporting that every attempt at deleting a Windows 10 profile ends up with the error ‘Profile not deleted completely. Error – The directory is not empty.’ This particular issue is reported to occur on every Windows 10 edition including Windows 10 Home, Windows 10 PRO, and Windows 10 Enterprise.

Profile not Deleted Completely' Error
Profile not Deleted Completely’ Error Fix

After investigating this particular issue thoroughly, it turns out that there are several different underlying causes that might cause this particular issue to occur on Windows 10. Here’s a list of potential culprits that might be responsible for this error code:

  • Windows Search Interference – As it turns out, one of the most common culprits that might be causing this particular error code is interference caused by the Windows Search service that still holds cache data associated with the Windows profile you are trying to delete. In this case, you can fix the problem by temporarily disabling this service while Windows Search is disabled.
  • Remnant user profile registry keys – Under certain circumstances, you can respect to see this error popping up if you have some kind of remnant Registry hive associated with the problematic user profile that is still not released by your operating system. In this case, you can fix the issue by using the Registry Editor utility to remove the leftover registry keys.
  • The deletion process is incomplete – Keep in mind that if you attempt to delete the profile from the Windows 10 GUI, the user profile will not be deleted permanently. If you find yourself in this scenario you can complete the deletion process by deleting the ‘unknown account’ listing from the System Properties menu.

Now that you are intimately familiar with every underlying culprit that might be responsible for the apparition of this error code, here’s a list of verified methods that other affected users have successfully used to get to the bottom of this error code:

Method 1: Disabling Windows Search

Although this might seem like an unlikely culprit, one of the most common instances that might produce this error is an instance in which the Windows Search service is preventing you from completely deleting every remnant data associated with the Windows Profile you’re attempting to delete.

Several affected users have confirmed that they managed to fix the ‘Profile not deleted completely. Error – The directory is not empty.’ issue completely by using the Services screen to disable the Windows Search service before attempting to delete the problematic Service profile.

If you find yourself in the same scenario, follow the instructions below to temporarily disable the Windows Search service before deleting the profile in order to avoid the error altogether:

Important: Ensure that you follow the instructions below to the end in order to re-enable the Windows Search service once the error is avoided, as this is a critical service for your Windows installation.

  1. Press Windows key + R to open up a Run dialog box. Next, type ‘services.msc’ inside the text box, then press Enter to open up the Services screen. When you’re prompted by the UAC (User Account Control), click Yes to grant admin access.
    Accessing the Services menu from a Run dialog box
  2. Once you’re inside the Services screen, move over to the right-hand section and scroll down through the list of available services until you locate the Windows Search service.
  3. After you manage to locate the correct service listing, right-click on it and choose Stop from the context menu that just appeared.
    Stopping the Windows Search service
  4. Once the service has been successfully stopped, press Windows key + R to open up another Run dialog box. Next, inside the text box, type ‘SystemPropertiesAdvanced’ and press Enter to open up the System Properties screen.
    Accessing the System Properties screen
  5. Once you’re inside the System Properties screen, access the Advanced tab from the menu at the top, then click on the Settings button associated with User Profiles.
    Accessing the Settings screen of User Profiles
  6. Once you’re inside the User Profiles menu, select the profile that you want to get rid of, then click on the Delete button and confirm the process to remove it completely.
  7. Finally, after you have successfully managed to remove the problematic Windows profile without enocuntering the same ‘Profile not deleted completely. Error – The directory is not empty’ error, press Windows key + R to open up another Run box. Next, type ‘services.msc’ inside the text box, then press Enter to open up the Services screen. When you’re prompted by the UAC (User Account Control), click Yes to grant admin access.
     
  8. Once you successfully return to the Services screen, locate the Windows Search service once again from the right-hand section and re-enable it by right-clicking on it and clicking on Start.
    Starting the Windows Search menu

If this method was not applicable in your particular case or you already did the steps above to no effect, move down to the next method below.

Method 2: Removing the leftover Registry Keys

In case you couldn’t complete the method above because of the Delete button inside the User Profiles screen, it’s likely due to some kind of remnant registry hive files that have not been released by the operating system.

If this scenario is applicable, you should be able to fix this problem by using the Registry Editor to remove any leftover registry keys that might be causing the Profile not deleted completely. Error – The directory is not empty.

Several affected users have reported that they were finally able to fix the problem after deleting every account registry key associated with the problematic profile.

If you haven’t tried resolving the error by clearing the registry equivalents of the problematic Windows profile, follow the instructions below:

  1. Open File Explorer or My Computer and navigate to C:\Users.
  2. Once you’re inside the Users folder, look for the folder named after the folder that you want to get rid of. When you see it, right-click on the correct folder and choose Delete from the context menu.
    Deleting the remaining User Profile

    Note: Users are a protected folder, so you will need to provide admin access in order to delete the profile folder – When prompted by the UAC (User Account Control), click Yes to grant admin access.

  3. Press Windows key + R to open up a Run dialog box. Next, type ‘regedit’ inside the text box and press Enter to open up the Registry Editor utility, then click Yes at the UAC (User Account Control) prompt to open it with admin access.
    Opening the Regedit utility
  4. Once you’re inside the Registry Editor utility, use the left-hand side menu to access the following location:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList

    Note: You can either navigate to this location manually (using the left-hand side menu) or you can paste the location directly into the navigation bar and press Enter to get there instantly.

  5. Under ProfileList, you will notice a series of keys that correspond to a Windows profile (they are named similar to S-1-5-18). Your job is to access every entry and check the ProfileImagePath data associated with it.
    Removing the remnant registry key

    Important: The value data of ProfileImagePath data should specify the Windows profile. Your job at this point is to identify the folder the registry key that needs to be deleted.

  6. Once you’ve managed to identify the correct ProfileList key that contains remnants of profile data, right-click on it and choose Delete from the context menu that just appeared.
    Deleting the profile list key
  7. Restart your computer and repeat the action that was previously triggering the ‘Profile not deleted completely. Error – The directory is not empty.’ error code.

If this scenario is applicable, move down to the next potential fix below.

Method 3: Deleting the ‘Unkown Account’

Keep in mind that deleting the Windows profile conventionally will not actually remove every remnant file from your computer. As it turns out after you remove the profile conventionally from the Windows 10 interface, the recently deleted profile will actually be labeled “Account Unknown” and will still be displayed under User Profiles.

According to some affected users, until you take the time to remove the entry associated with Account Unknown from the User Profiles menu.

If you’re looking for specific instructions on how to do this, here’s what you need to do:

  1. Press Windows key + R to open up a Run dialog box. Next, type ‘sysdm.cpl’ inside the text box and press Enter to open up the System Properties screen. If you’re prompted by the UAC (User Account Control), click Yes to grant admin access.
    Accessing the System Properties screen
  2. Once you’re inside the System Properties screen, click on the Advanced tab, then click on the Settings button associated with User Profiles.
    Accessing the User Profiles folder
  3. Once you’re inside the User Profiles menu, select the profile named “Account Unknown‘ and click the Delete button to remove every remnant file from the user profile.
    Removing the remnant user profile files
  4. Restart your computer and see if the problem is now fixed.
ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.