How do I clean-up appdata\local\packages... folders that contain old attachments and photos

Anonymous
2023-01-07T18:36:23+00:00

There are several folders under users...\appdata\local\packages\microsoft.windowscommunicationsapps_... \localstate\files\s0\ then numbers, ie 1, 3, 4, 5, 6, 14, 128... with subfolders called "attachments" and "photos". Some of these appears to be attachments from emails, but there are also website logos, etc. Many of these are very old.

Is there a way to clean up these files other than individually going into the "attachments" and "photos" for each "numbered" subfolder?

Is there a setting to get Windows to clear these out, routinely.

Windows for home | Windows 10 | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

6 answers

Sort by: Most helpful
  1. Anonymous
    2023-01-08T08:36:40+00:00

    Hello ced2

    Welcome to Microsoft Community.

    According to your description you want clean these files routinely. You can try following these steps to clear these files.

    1. In the desktop create a new TXT file. Enter this command.

    del /f /s /q C:\Users\Administrator\AppData\Local\Packages\microsoft.windowscommunicationsapps_8wekyb3d8bbwe\LocalState\Files\S0\.**

    You need change the path to your path. You can copy the path in Windows explorer.

    Image

    1. Change .txt to .bat
    2. Run this Bat file it will clear all files under S0
    3. For clear the files routinely we need using Task Scheduler Search "Task Scheduler" in Search Bar Image
    4. Click it and create a new Task Image
    5. Setting like this. You can change "Name" and "Description" as you want

    Image

    1. Click Triggers. Click new. Set the time you want.

    Image

    8.Click Actions. Click new. Click Browser. Choose the bat file you made before.

    Image

    1. You will see this task in Tash Scheduler Library .

    Image

    Your patience and cooperation are highly appreciated.

    Best Regards,

    Tommy-MSFT | Microsoft Community Support Specialist

    3 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-01-08T13:48:12+00:00

    Tommy -

    Thank you for the information. I will try this out.

    I have a related question: Why does Windows even store/save these files with no automatic cleanup?

    Are there other folders with this type of old/outdated files that can also be cleaned up?

    Thanks.

    11 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2023-01-09T01:58:23+00:00

    Hi ced2

    Thanks for your reply

    Some users will configure POP, It will make the data on the server will be cleaned after mail synchronization,If Windows

    celaned atuomatically, these user may lost this data So Windows does't clean this data automatically.

    The command I give you means clean all files under the path you give, you can change any path you want to clean all

    files under this path

    Best Regards,

    Tommy-MSFT | Microsoft Community Support Specialist

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2023-03-13T15:59:03+00:00

    I am on Windows 10 and have manually purged the largest file (SO\1882\Attachments) found under SO

    it keeps repopulating

    the SO folder is now 1.45GB

    if this is a mail or calendar setup issue then MS should find a way to help us configure and choose if we want this file populated

    does windows 11 have this problem?

    1 person found this answer helpful.
    0 comments No comments
  5. Anonymous
    2023-08-19T19:35:55+00:00

    probably because they want us to use onedrive. I just found a whatsapp folder worth 77GB, no wonder I cant update my drivers..

    2 people found this answer helpful.
    0 comments No comments