LCU folder is LARGE-But what is it?

Page 3 of 3 FirstFirst 123
  1. pietcorus2's Avatar
    Posts : 1,873
    Windows 10 Pro x64
       #21

    1 GB !
      My Computer

  2. AddRAM's Avatar
    Posts : 4,487
    Windows 10 Pro
       #22

    I had like 50,000 files in there, but not anymore
      My Computers

  3. Kol12's Avatar
    Posts : 2,975
    Windows 11
       #23

    Aren't these the files kept in case you want to uninstall or roll back an update?
      My Computer

  4. buglocker2's Avatar
    Posts : 203
    Windows 10 pro x64
       #24

    Deleted without problems


    A week ago, I deleted the LCU folder. It had a size of 1GB and a few thousand files and folders.
    There's been no problem.
      My Computer


  5. Posts : 4
    Windows 10
       #25

    After November's CU I had permission issues when trying to delete the contents of the LCU folder.

    I ended up mirroring an empty folder with Robocopy to the LCU folder by saving and running the following script from an Admin Powershell Window. This was also much faster than deleting the contents through Explorer

    Code:
    $LCUPath = 'C:\Windows\servicing\LCU\'
    $EmptyFolder = 'C:\Temp\empty'
    
            if (-not (Test-Path -Path $EmptyFolder))
            {
                mkdir $EmptyFolder
            }
    
            $null = robocopy $EmptyFolder $LCUPath /MIR /R:5 /W:1
    Last edited by QuantumX; 16 Nov 2021 at 04:04.
      My Computer

  6. AddRAM's Avatar
    Posts : 4,487
    Windows 10 Pro
       #26

    2 weeks old ya but... You should add Take Ownership to your right click option.
    It`s a simple regedit.

    Add Take Ownership to Context Menu in Windows 10 | Tutorials (tenforums.com)
      My Computers

  7. Bree's Avatar
    Posts : 22,704
    10 Home x64 (21H2) (10 Pro on 2nd pc)
       #27

    AddRAM said:
    2 weeks old ya but... You should add Take Ownership to your right click option.
    It`s a simple regedit.

    Add Take Ownership to Context Menu in Windows 10 | Tutorials (tenforums.com)

    You shouldn't need to, the Administrators group has always had Full control permission for LCU in Windows 10. Now in Windows 11 MS have reduced that read permission for administrators, I suppose its possible they may have brought W10 in line with the latest update.


    Anyway, ownership of LCU is best left with TrustedInstaller. So if you have permissions issues deleting anything in LCU, then take ownership, grant the Administrators group Full control, then return ownership to NT Service\TrustedInstaller. I have done this on all my W11 machines and can now delete anything that appears in LCU.
      My Computers


  8. KCR
    Posts : 345
    Windows 10 Home, 64-bit, Version 21H2 (OS Build 19044.1469)
       #28

    Bree said:
    I suppose its possible they may have brought W10 in line with the latest update.
    .

    It was still the same as of 11/22/2021. . .

    LCU folder is LARGE-But what is it?-image.png

    .
      My Computers

  9. Rahulji's Avatar
    Posts : 19
    Windows 10
       #29

    QuantumX said:
    After November's CU I had permission issues when trying to delete the contents of the LCU folder.

    I ended up mirroring an empty folder with Robocopy to the LCU folder by saving and running the following script from an Admin Powershell Window. This was also much faster than deleting the contents through Explorer

    Code:
    $LCUPath = 'C:\Windows\servicing\LCU\'
    $EmptyFolder = 'C:\Temp\empty'
    
            if (-not (Test-Path -Path $EmptyFolder))
            {
                mkdir $EmptyFolder
            }
    
            $null = robocopy $EmptyFolder $LCUPath /MIR /R:5 /W:1
    I used CMD command: rmdir /Q /S "folder_in_LCU" but it does not delete long name files... How does your script works, fine? Delete all?
      My Computer

  10. Try3's Avatar
    Posts : 10,063
    Windows 10 Home x64 Version 21H2 Build 19044.1466
       #30

    Rahulji said:
    How does your script works, fine? Delete all?
    The script uses a common trick:- to RoboCopy [to mirror] the contents of an empty folder into the desired location so that it is emptied.
    - It has the effect of deleting all contents but does not use any delete command.
    - RoboCopy is a built-in Windows command

    You can also reduce the size of the LCU folder by simply running Disk cleanup. That's all I ever do.
    Open and Use Disk Cleanup - TenForumsTutorials

    Denis
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 22:13.
Find Us




Windows 10 Forums