How to Delete the Paging File Using the Command Prompt

To delete the paging file using the command prompt, use the following commands:

First disable the paging file:

wmic computersystem where name="%computername%" set AutomaticManagedPagefile=False


Then delete the paging file with this command:

wmic pagefileset where name="C:\\pagefile.sys" delete

To confirm that the paging file is gone, issue this command:

wmic pagefile or wmic pagefile list /format:list

Add a Comment

Your email address will not be published. Required fields are marked *