ReSharper 2022.2 Help

Clean up temporary files

ReSharper helps monitor and clean up temporary files that your development pipeline produces. These include logs, caches, outdated artifacts of build tools and package manages, and so on. You can manage temporary files on the Environment | Disk Cleanup page of ReSharper options (Alt+R, O).

File masks for temporary files produced by ReSharper are included in the list of monitored locations by default. But you can also add other locations specific to your development workflow.

Add custom temporary files locations

  1. Select ReSharper | Options from the main menu or press Alt+R O, then choose Environment | Disk Cleanup on the left.

  2. Click Add Add. A new entry will be added to the table.

  3. In Path template, specify a file mask that matches a set of temporary files.

    You can use Ant-style wildcards in file masks:

    • ? to match a single character excluding directory separators

    • * to match zero or more characters excluding directory separators

    • ** to match any number of characters including directory separators

    • / or \ to match directory separators regardless of the OS path format

    For example a pattern **Test?\**.* will match the following files:

    • C:\Projects\MyTestX\data\file_one.txt

    • /home/projects/TestY/file_two.xml

    But not:

    • C:\Projects\Test\data\file_one.txt

    • /home/projects/TestY/file_two

    If you are sharing solution settings, be careful not to save absolute paths to a shared settings layer.

  4. In Outdated after, set the number of days after which a file matched by the path template is considered outdated since its last modification.

  5. In Description, specify an arbitrary description for the set of files matched by the path template.

If your disk space is getting full, you can clean up temporary files right away.

Clean up temporary files manually

  1. Select ReSharper | Options from the main menu or press Alt+R O, then choose Environment | Disk Cleanup on the left.

  2. Use the buttons in the Manual cleanup section to delete only outdated or all temporary files:

    Clean Up Selected

    Click this button to delete files that are considered outdated in the location selected in the table.

    Delete All in Selected

    Click this button to delete all files and folders in the location selected in the table.

    Clean Up All

    Click this button to delete files that are considered outdated in all locations listed in the table.

    Delete All

    Click this button to delete all files and folders in all locations listed in the table.

By default, ReSharper enables automatic cleanup of outdated temporary files.

Configure scheduled cleanup of temporary files

  1. Select ReSharper | Options from the main menu or press Alt+R O, then choose Environment | Disk Cleanup on the left.

  2. Use the controls in the Scheduled cleanup section to toggle the automatic cleanup and change the time interval, in days, between scheduled launches of the cleanup.

Last modified: 08 August 2022