Skip to content

TechQuack

Welcome to the home of Windows, Mac, and Software reviews, guides and tutorials.

  • Home
  • Windows
  • MacOS (Apple)
  • Software
  • Reviews
  • Other
  • Windows

How to Troubleshoot “Profile not deleted completely” Error on Windows 10

by Mark GinterJune 29, 2023June 28, 2023
  • If the user profile deletion process was not completed correctly, you may see the error message “Profile not completely deleted”, “Error – Directory not empty” This error message usually appears when you delete part of a domain profile, but you may find it on an ordinary home computer as well.
  • The deletion process is not complete: if you try to delete a profile through the Windows 10 user interface, it will not be permanently deleted.

 

Unveiling the Ultimate Solution: Resolve Profile Not Deleted Completely Error in Windows 10

Run the Windows Troubleshooter: Use the built-in Windows Troubleshooter to automatically detect and fix any issues related to the profile not being deleted completely error in Windows 10. Simply search for “Troubleshoot” in the Windows search bar, select “Troubleshoot settings,” and follow the on-screen instructions.

Table of Contents

  • Disabling Windows Search and Removing leftover Registry Keys
  • Deleting the ‘Unknown Account’ and Removing the directory contents
  • Deleting a user profile from System Properties and Disabling Windows Search service
  • Removing a user profile as Administrator
        • Mark Ginter
    • Related posts:

Disabling Windows Search and Removing leftover Registry Keys

To fix the “Profile Not Deleted Completely” error in Windows 10, you can disable Windows Search and remove leftover registry keys. Here’s how:

1. Disable Windows Search:
– Press the Windows key + R, type “services.msc,” and hit Enter.
– In the Services window, scroll down and find “Windows Search.”
– Right-click on it and select “Properties.”
– In the General tab, change the startup type to “Disabled,” and click Apply and OK.

2. Remove leftover registry keys:
– Press the Windows key + R, type “regedit,” and hit Enter.
– In the Registry Editor, navigate to “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList.”
– Look for any keys that have “.bak” at the end and delete them.
– Next, navigate to “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileGuid.”
– Delete any keys related to the problematic user profile.
– Close the Registry Editor.

Remember to back up your registry before making any changes.

If the issue persists, it’s recommended to seek expert assistance or use specialized software like Outbyte’s Driver Updater to update your drivers and resolve any compatibility issues.

Note: This solution is primarily for Windows 10 Pro edition. Some options and settings may vary in other Windows editions.

Deleting the ‘Unknown Account’ and Removing the directory contents

  1. Open File Explorer by pressing Windows key + E.
  2. Navigate to the following directory: C:\Users.
    Open File Explorer by pressing Windows key + E.
Navigate to the following directory: C:\Users.
  3. Locate the folder corresponding to the ‘Unknown Account’ that needs to be deleted.
  4. Right-click on the folder and select Delete.
  5. A confirmation dialog will appear, click Yes to permanently delete the folder.
  6. Open Run dialog by pressing Windows key + R.
  7. Type regedit and press Enter to open the Registry Editor.
  8. In the Registry Editor, navigate to the following path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList.
    Type regedit and press Enter to open the Registry Editor.
In the Registry Editor, navigate to the following path: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList.
  9. Under the ProfileList key, you will find a list of subkeys starting with S-1-5-21.
  10. Go through each subkey and look for the one with a ProfileImagePath value containing the path to the folder of the ‘Unknown Account’.
    Under the ProfileList key, you will find a list of subkeys starting with S-1-5-21.
Go through each subkey and look for the one with a ProfileImagePath value containing the path to the folder of the 'Unknown Account'.
  11. Once you find the correct subkey, right-click on it and select Delete.
  12. Confirm the deletion by clicking Yes in the confirmation dialog.
  13. Close the Registry Editor.

Deleting a user profile from System Properties and Disabling Windows Search service

To fix the “Profile Not Deleted Completely” error in Windows 10, you can follow these steps:

1. Open the System Properties window by right-clicking on the Start button and selecting “System”.

2. In the System Properties window, go to the “Advanced” tab and click on the “Settings” button under the “User Profiles” section.

3. In the User Profiles window, select the user profile that you want to delete and click on the “Delete” button.

4. If the “Delete” button is greyed out, it means that the user profile is still in use. In this case, you need to disable the Windows Search service.

5. Press the Windows key + R to open the Run dialog box, type “services.msc”, and hit Enter.

6. In the Services window, scroll down and locate the “Windows Search” service.

7. Right-click on the “Windows Search” service and select “Properties”.

8. In the Properties window, change the “Startup type” to “Disabled” and click on the “Stop” button to stop the service.

9. Click on “Apply” and then “OK” to save the changes.

10. Now, go back to the User Profiles window and try deleting the user profile again. It should now be deleted successfully.

By following these steps, you can fix the “Profile Not Deleted Completely” error in Windows 10 and remove unwanted user profiles from your system.

powershell
# This script deletes a user profile in Windows 10

# Enter the username whose profile you want to delete
$profileToDelete = "username"

# Function to delete user profile
function Delete-UserProfile {
param (
[Parameter(Mandatory=$true)]
[string]$username
)

$sid = (New-Object System.Security.Principal.NTAccount($username)).Translate([System.Security.Principal.SecurityIdentifier]).Value
$profilePath = Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$sid" -Name "ProfileImagePath" | Select-Object -ExpandProperty "ProfileImagePath"

# Remove the associated registry key
Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$sid" -Force

# Delete the user profile folder
Remove-Item -Path $profilePath -Recurse -Force

Write-Host "User profile for $username has been deleted."
}

# Usage: Delete-UserProfile -username "username"
Delete-UserProfile -username $profileToDelete

In this sample code, a PowerShell script is used to delete a user profile based on the provided username. It retrieves the user’s Security Identifier (SID) and then removes the associated registry key and the user profile folder. However, please exercise caution when using this code, and ensure that you have a backup of any important data before attempting to delete user profiles.

Removing a user profile as Administrator

To remove a user profile as an Administrator in Windows 10, follow these steps:

1. Press the Windows key + R to open the Run dialog box.
2. Type “sysdm.cpl” and press Enter. This will open the System Properties window.
3. Go to the “Advanced” tab and click on the “Settings” button under User Profiles.
4. In the User Profiles window, select the user profile you want to remove and click on the “Delete” button.
5. Confirm the deletion by clicking “Yes” when prompted.
6. If the “Delete” button is greyed out or you receive an error message saying the profile cannot be deleted because it is still in use, try the following:
a. Restart your computer and try again.
b. Use the Command Prompt to delete the user profile. Open Command Prompt as an Administrator and type the following command:
net user [username] /delete (replace [username] with the actual username)
c. Use third-party software like Outbyte to fix any issues with the user profile removal process.

Remember to be cautious when deleting user profiles, especially if it is a domain profile or a profile associated with important system settings.

Mark Ginter
Website | + posts

Mark Ginter is a tech blogger with a passion for all things gadgets and gizmos. A self-proclaimed "geek", Mark has been blogging about technology for over 15 years. His blog, techquack.com, covers a wide range of topics including new product releases, industry news, and tips and tricks for getting the most out of your devices. If you're looking for someone who can keep you up-to-date with all the latest tech news and developments, then be sure to follow him over at Microsoft.

  • Mark Ginter
    https://techquack.com/author/mark/
    Fixing Discord no longer works in the game
  • Mark Ginter
    https://techquack.com/author/mark/
    How to Resolve USB Headset Mic Not Working on Windows 10
  • Mark Ginter
    https://techquack.com/author/mark/
    How to Repair Netflix Error F7702-1003 [Firefox Browser]
  • Mark Ginter
    https://techquack.com/author/mark/
    How to Repair Printer Error 0x803C010B in Windows Computers

Related posts:

Fixing the "You do not have permission to turn off this computer" message in Windows 7Fixing the “You do not have permission to turn off this computer” message in Windows 7 How to fix it : User Profile not found in RegistryHow to fix it : User Profile not found in Registry Troubleshooting the message: We cannot sign in to your account, you've been logged in with a temporary profileTroubleshooting the message: We cannot sign in to your account, you’ve been logged in with a temporary profile Recovering a steam corrupt disk error in WindowsRecovering a steam corrupt disk error in Windows
Tagsbeing deletedcorruptfilefixfolderlaptoppreventrecoverregistryrenamerestorescreentemptemporarytemporary profileuser profile

Post navigation

Previous Post

Troubleshooting the Problem of Google Calendar/Mail Not Syncing in Windows 10

Next Post

Troubleshooting HP Printer Service Error 79

WordPress Theme: Harrison by ThemeZee.