Clear Filters
Clear Filters

Can't delete the cache folders created by simulink

100 views (last 30 days)
How do I delete these folders that Simulink keeps creating? I can't delete them from within matlab or file explorer. R2020a and R2021a do the same thing. I'm setting up an experiment and need to run something on the order of 100k simulations, so this is going to be a problem.
When I use file explorer I get admin permission error (it does this for all folders):
When I use file explorer as admin I also get a permission error (for all folders):
I can't even go in and change the permissions to delete them. I just did that but still getting the same error, even though "admin", "authenticated users", "darrahts", <basically all the user options> have "full control" permissions. The folders themselves are also marked read only, and when I deselect that and select the option to propogate the changes to subfolders and files, it does not propogate, and subfolders and files also remain read only.
I need these folders to be automatically deleted.

Answers (1)

Sivani Pentapati
Sivani Pentapati on 29 Nov 2021
Please follow the below steps to clear cache folders of simulink
  • You need to restore the MATLAB default search path, so it is important to take a backup of your 'pathdef.m' file, which can be located by using the command:
which -all pathdef
  • Before proceeding, ensure that you make a safe copy of the file by copying it to a folder outside of your MATLAB path.
  • After taking the backup, please execute the following commands in the MATLAB Command Window to restore the default MATLAB search path and rehash the toolbox cache
restoredefaultpath
rehash toolboxcache
sl_refresh_customizations
  • After this step, please use MATLAB/Simulink to see if the issue occurs again. If the issue is resolved, then you may want to save the new MATLAB search path by executing the following command:
savepath

Categories

Find more on Search Path in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!