If you really want to delete it, first disable it. You can do this from advanced performance options in System Properties.
You can get there by running sysdm.cpl
, clicking the Adanced tab and clicking the Settings... button for Performance. Then clicking the Advanced tab in the new Performance Options window and clicking the Change... button.
- Uncheck
Automatically manage paging file size for all drives
- Set all drives to No paging file
- Click OK until Windows suggests restarting
After restarting you can safely delete pagefile.sys
.
However, I don't think you should ever disable the pagefile, especially if you have an SSD; as an SSD will only speed it up.
Windows always uses virtual memory, and although RAM pools are large enough these days for most people to avoid problems, there's no real benefit in making Windows unstable by limiting that space to the size of your RAM rather than the size of what Windows may need.