How to delete Flash cookies (Local Shared Objects)

In this post, I’ll explain how to delete files known as Flash cookies from a Windows computer using a batch file.

Most people are familiar with the concept of cookies – small files saved to your computer by the web sites you visit – and how to delete them. But there is a wide-spread misconception that simply deleting your cookies erases your tracks. Even when you’ve instructed your browser to delete cookies and browsing history, a potentially large collection of files remains, and the paths to these files contain the domain names of the sites that have placed them on your computer.

Local Shared Objects (LSO), commonly called Flash cookies, are collections of cookie-like data stored as a file on a user’s computer. LSOs are used by all versions of Adobe Flash Player…

With the default settings, Adobe Flash Player does not seek the user’s permission to store LSO files on the hard disk.

There is relatively little public awareness of LSOs, and they can usually not be deleted by the cookie privacy controls in a web browser.

The files are saved to two locations in the roaming profile:
%APPDATA%\Macromedia\Flash Player\#SharedObjects
%APPDATA%\Macromedia\Flash Player\\support\flashplayer\sys

As an example, a visit to YouTube will result in the following folders being created:
C:\Users\Oliver\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\KV9EDJYY\
C:\Users\Oliver\AppData\Roaming\Macromedia\Flash Player\\support\flashplayer\sys\

Create a text file with the following lines, then save it as deleteLSOs.bat. Run the batch file to delete and remake these folders, thereby clearing all of the subfolders and files.

@echo off
copy "%APPDATA%\Macromedia\Flash Player\\support\flashplayer\sys\settings.sol" "%USERPROFILE%\Local Settings\Temp\settings.sol"
rmdir /s /q "%APPDATA%\Macromedia\Flash Player\#SharedObjects"
md "%APPDATA%\Macromedia\Flash Player\#SharedObjects"
rmdir /s /q "%APPDATA%\Macromedia\Flash Player\\support\flashplayer\sys"
md "%APPDATA%\Macromedia\Flash Player\\support\flashplayer\sys"
copy "%USERPROFILE%\Local Settings\Temp\settings.sol" "%APPDATA%\Macromedia\Flash Player\\support\flashplayer\sys\settings.sol"

Note that the script backs up and then restores a settings.sol file that contains the Flash Player global settings, which can be managed from the Flash Player Settings Manager.

5 thoughts on “How to delete Flash cookies (Local Shared Objects)

  1. Virtualguy

    Deleting the entire directory that contains the Flash settings cookie is stupid, because, then you have to constantly reset your flash settings. Think!

  2. ardamis Post author

    It’s true that deleting the entire contents of “%APPDATA%MacromediaFlash Playermacromedia.comsupportflashplayersys” will also delete the settings.sol file that contains your Flash Player global settings. This file will be automatically recreated with the default settings.

    I would assume that most users are running with the default settings anyway, but with a minor change to the script, you can back up that file before the folder is deleted, and then restore it after the folder is remade.

    I’ve updated the script example to do this.

  3. j518

    Oliver, it’s simple and easy – default settings are really no issue for the vast majority of users. You always will have a ‘sharp-shooter’; however, no one else has stepped up to the plate. I thank you for posting this.
    If you’re unaware, Radio Shack and its website operator, GSI Commerce Solutions Inc., are currently involved in a potential class action lawsuit, alleging the electronics retailer secretly tracked the Internet browsing activities of website visitors and shared this private information with third parties, utilizing LSOs.

  4. Juergen P

    your batch code is still, in 2018, helpful to kill permanent cookies and such stuff.
    Thanks a lot!

Comments are closed.