Windowsシステムは、仮想メモリにページファイル(Page file)(pagefile.sys )を使用します。(pagefile.sys)ある種の追加RAMとして機能します。(RAM)ページングファイルはシステムのパフォーマンスと速度を向上させますが、一部のユーザーはシステムの動作を変更(some users prefer to modify)することを好みます。これは、 Windowsが(Windows)Pagefile.sysに保存するデータをいつでも確認できないためです。ページングファイルにはパスワードなどの機密データが含まれている可能性があり、再起動してもシステムから削除されません。
ここでの危険は、すべてのユーザーがCドライブに移動し、無制限にアクセスできるようにすることで、このファイルにアクセスできることです。許可されていないユーザー、サーバー上の他のオペレーティングシステム、およびネットワーク上の他のデバイスも、ストレージデバイスにコピーして分析することができます。
Windowsシステムは、ページングファイルを正しく保護します。これは、ページングファイルを誤って構成または削除すると、より大きなリスクが生じる可能性があるためです。ただし、ページングファイルのデータを保護するためのオプションがあります。このガイドでは、これらのオプションについて説明します。
Windowsでのシャットダウン時にPageFile.sys(Delete PageFile.sys)をバックアップ、移動(Move)、または削除する
コンピュータシステムからページングファイルを明示的に削除する代わりに、このページに示されている一連のアクションに従うことができます。このガイドで取り上げるフェーズは次のとおりです。
- 準備段階:ファイルをバックアップ(Back)します。
- (Delete)ファイルエクスプローラー(File Explorer)からページングファイルを削除します。
- 別の方法:ページングファイルを別のドライブに移動します
- 推奨:シャットダウンのたびにPagefile.sysを削除するようにコンピューターを設定してください(Pagefile.sys)
これらの手順の一部は、経験豊富な技術者のみが処理する必要があります。ただし、技術的な経験に関係なく、誰でもガイドに従うことができるように、それらを分解します。
1]準備段階:ファイルをバックアップ(Back)します
ページングファイルは非常に重要であり、システムのパフォーマンスを向上させますが、削除する場合は、最初にファイルをバックアップすることをお勧めします。これにより、pagefile.sysを削除すると問題が発生した場合にファイルを簡単に復元できます。
Windowsコンピュータをバックアップする方法はいくつかあります。ハードディスクやDVDなどの外部ストレージメディアを接続し、以下の簡単な方法に従ってください。
[スタート(Start)]ボタンを選択して、 [コントロールパネル(Control Panel)]を検索します 。コントロールパネルを開き、[ System and Security > Backup and Restoreに移動します。この後、次のいずれかの手順に従います。

- 最近Windowsバージョンをアップグレードした場合、またはバックアップを作成するのが初めての場合は、[バックアップのセットアップ(Set up backup)]をクリックして、ウィザードの画面の指示に従います。
- 過去にバックアップを作成したことがある場合は、[ 今すぐ(Back up now)バックアップ]オプションをクリックします。
- 初めてのバックアップではないが、新しいバックアップを作成する場合は、 [新しい完全バックアップ(Create new, full backup)の作成]オプションを選択し、ウィザードの画面の手順に従います。
2]ファイルエクスプローラー(File Explorer)からページングファイルを削除します(Delete)
まず、ファイルエクスプローラー(File Explorer)を開きます。Windows key + Eを押すことですばやく実行できます 。
[ 表示(View)]メニューを クリックして、[オプション(Options)]に移動します。
[ 保護されたオペレーティングシステムファイルを非表示にする(推奨)](Hide protected operating system files (Recommended))チェックボックスをオフにします。
[隠しファイルとフォルダー(Hidden files and folders)]で 、[ 隠しファイル、フォルダー、およびドライブを表示(Show hidden files, folders, and drives)する]オプションを選択し、 [ OK ]ボタンをクリックします。
ページングファイルは保護されたシステムファイルです。したがって(Hence)、それは隠されています。上記の手順により、Windowsエクスプローラー(Windows Explorer)でこのファイルを表示できます。これで、ファイルを削除する準備が整いました。
This PC > Local Disk (C:)に移動し ます。
pagefile.sysファイルはここにあります 。このファイルを右クリックして、 [削除(Delete)]をクリックします。
ページファイルのサイズ(the Page file’s size)が原因で、ほとんどの場合、ごみ箱(Recycle Bin)には移動せず、完全に削除されます。そのため、バックアップフェーズが重要です。
(Notice)Windowsがそれをシステムファイル(System file)として分類していることに 注意してください。それはあなたのコンピュータの円滑な操作にとって重要であることを意味します。そのため、削除できない場合があります。
ページングファイル(pagefile.sys)はWindowsエクスプローラー(Windows Explorer)で表示できますが、削除しようとすると、別のプログラムが使用していると表示される場合があります。
2]代替方法:ページングファイルを別のドライブに移動します
システムからページングファイルを削除する代わりに、新しい場所に新しいpagefile.sysファイルを作成するようにコンピューターを設定できます。このソリューションは、ハードドライブのパフォーマンスに匹敵する、またはそれを上回る別のドライブを使用している場合に最適です。
Windows key + Iの組み合わせを押して、[設定]を開きます。
ここで、 System > About情報]に移動します。次に、[ 関連設定 ]領域の下にある[(Related settings )システム情報 (System info )]リンクをクリックします。

左側のペインで[システムの詳細設定(Advanced system settings)]オプションを選択します。
[詳細(Advanced)設定]タブに切り替えて、 [パフォーマンス (Performance )]領域の下にある[設定](Settings)ボタンをクリックします。

[パフォーマンスオプション(Performance Options)]ウィンドウで、[詳細設定]タブをクリックすると、[(Advanced )仮想(Virtual)メモリ]セクションにページングファイルのサイズが表示されます。ここで変更(Change)ボタンを押します。
すべてのドライブのページングファイルサイズを自動的に管理するため(Automatically manage paging file size for all drives)のチェックボックスをオフにし ます。
C:[システム](C: [System] )ドライブをクリックし、 これを選択した状態で、下に移動して [ページングファイルなし(No paging file)]オプションを選択します。設定 ボタンを押します。(Set)

ドライブに戻り、ページングファイルを保存するボリュームを選択します。
下にスクロールして、ドライブ のシステム管理サイズをクリックし、[(System managed size)設定(Set)]ボタンをクリックします。最後に 、プロンプトの[はい (Yes )]ボタンをクリックします。
プライマリドライブのページングファイルが正常に無効になりました。ただし、ページングファイルを無効にすると、システムエラーが発生した場合にシステムがクラッシュダンプを作成しなくなるため、これを行うことはお勧めしません。
次のステップは、ページングファイルを保存するドライブを選択することです。この同じ画面から、このドライブをクリックし 、ドライブCの場合のように[ページングファイルなし(No paging file)]ではなく [システム管理サイズ]を選択します。(System managed size)
[設定(Set)]ボタンを押し、[ 適用(Apply)]と [ OK ]をクリックして、設定を保存してウィンドウを閉じます。
最後に、マシンを再起動します。
読む(Read):Windowsで仮想メモリまたはページファイルをリセットする方法
シャットダウンするたびにPagefile.sysを削除するようにコンピューターを設定します
ページファイルがマシンにとって不可欠であることを知っているので、ページファイルなしでコンピュータを実行することは望ましくありません。
ただし、ページングファイルは、マシンを再起動した後でも持ち越されるため、セキュリティ上のリスクがあります。より良い方法は、シャットダウンするたびにページングファイルを削除するようにコンピュータシステムを設定すること(set your computer system to delete the paging file whenever it shuts down)です。
これらの方法では、コンピューターはシャットダウンするたびにページングファイルを削除し、再起動するたびにWindowsは新しいページングファイルを作成します。
注:(NOTE:)シャットダウンのたびにページングファイルを削除し、起動時に新しいページングファイルを作成すると、シャットダウンと起動の時間が遅くなります。
When the Clear virtual memory pagefile setting is turned on, when the system shuts down, the computer may take longer to shut down than it usually takes. This behavior occurs because when this policy setting is turned on, the computer must physically write to each page in the pagefile to clear each page. The period of time that it takes for the system to clear the pagefile varies according to the pagefile size, and the disk hardware that is involved.
1] Ultimate Windows Tweaker

フリーウェアのUltimateWindowsTweakerをダウンロードして使用し、クリックするだけで実行できます。Customization > File Explorerの下に設定が表示されます。
2]レジストリエディタの使用

Windows key + Rを押して、 [実行(Run)]ダイアログボックスを開きます。[実行(Run)]に「Regedit 」と入力 し、[ OK ]をクリックします 。
レジストリエディタ(Registry Editor)で、次のフォルダに移動します。
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
右側のペインで、ClearPageFileAtShutdownという名前のDWORDをダブルクリックし、(DWORD)値データ(Value data)を 1 に変更し ます。[ OK ]ボタンを押して変更を保存します。
注:この(NOTE: )DWORDが見つからない場合は、空白を右クリックして、[New > DWORD (32-bit) Value]から作成してください。名前を ClearPageFileAtShutdownに設定し、値データを 1に設定します。
レジストリエディタ(Registry Editor)を終了し、コンピュータを再起動します。
3]グループポリシーエディターの使用

Windows key + Rの組み合わせを押して、[実行(Run)]ダイアログボックスを開きます。
[実行(Run)]ダイアログボックスにgpedit.mscと入力 し、Enterキー(ENTER)を押します。
グループポリシーエディターで、左側のウィンドウの[コンピューターの構成]を展開します。(Computer Configuration)
[コンピューターの構成(Computer Configuration)]で、 Windows Settings > Security Settings > Local Policies > Security Optionsに移動します。
右側のペインで、[シャットダウン:仮想メモリのクリア]ページファイルを右クリックし、[(Shutdown: Clear virtual memory pagefile)プロパティ(Properties)]を選択し ます。
新しいウィンドウから[ 有効](Enabled)を選択 し、最後に[適用 (Apply )]ボタンと [ OK ]ボタンを押して構成を保存します。
繰り返し(Again)になりますが、ページングファイルを削除するとコンピュータに悪影響を与える可能性があることを強調しすぎることはできません。ただし、正当な理由がある場合は、上記のガイドに従って適切に実行してください。
Back up, Move, or Delete PageFile.sys on shutdown in Windows 11/10
Your Windows system uses the Page file (pagefile.sys) for virtual memory. It works as an extra RAM of sorts. The paging file improves your system’s performance and speed, but some users prefer to modify how it works. This is because you can’t be sure of what data Windows saves in Pagefile.sys at any time. The paging file could hold sensitive data such as passwords, and it doesn’t get deleted from your system even after a restart.
The danger here is that any user can access this file by navigating to the C drive and gaining unrestricted access to it. Unauthorized users, other operating systems on your server, and other devices on your network can also copy it out to their storage device and analyze it.
The Windows system rightly protects the paging file because misconfiguring or deleting it can pose a greater risk. However, you have options for protecting your data on the paging file. We’ll explore these options in this guide.
Back up, Move, or Delete PageFile.sys on shutdown in Windows
Instead of explicitly deleting the paging file off your computer system, you can follow the course of action proffered on this page. Here are the phases we’ll cover in this guide:
- Preliminary phase: Back up your files.
- Delete the paging file from File Explorer.
- Alternative: Move the paging file to a different drive
- Recommended: Set your computer to delete Pagefile.sys on every shutdown
Some of these procedures should be handled only by experienced techies. However, I’ll break them down so that anyone can follow the guide, regardless of your technical experience.
1] Preliminary phase: Back up your files
The paging file is crucial and improves your system’s performance, but if you insist on deleting it, I advise that you back up your files first, so that you can easily restore your files if deleting the pagefile.sys causes issues.
There are several ways to back up your Windows computer. Connect an external storage media such as a hard disk or DVD and follow the quick method below.
Select the Start button and search for Control Panel. Open the Control Panel and go to System and Security > Backup and Restore. After this, follow one of the below steps:

- If you recently upgraded your Windows version or it’s your first time making a backup, click on Set up backup and follow the on-screen instructions in the wizard.
- If you’ve made a backup in the past, click the Back up now option.
- If it’s not your first backup, but you want to create a new backup, choose the Create new, full backup option and follow the on-screen steps in the wizard.
2] Delete the paging file from File Explorer
First, open File Explorer. You can do this quickly by pressing the Windows key + E.
Click on the View menu and go to Options.
Unmark the Hide protected operating system files (Recommended) checkbox.
Under Hidden files and folders, select the Show hidden files, folders, and drives option and hit the OK button.
The paging file is a protected system file. Hence, it’s hidden. The steps above enable you to view this file in Windows Explorer. Following that, you’re now ready to delete the file.
Navigate to This PC > Local Disk (C:).
You’ll find the pagefile.sys file here. Right-click on this file and hit Delete.
Due to the Page file’s size, it most likely wouldn’t go to the Recycle Bin but be deleted entirely. That’s why the backing up phase is important.
Notice that Windows classifies it as a System file. Meaning that it’s crucial to the smooth operation of your computer. Therefore, the system may not let you delete it.
You can view the paging file (pagefile.sys) in Windows Explorer, but if you try to delete it, the system may say that another program is using it.
2] Alternative: Move the paging file to a different drive
Instead of deleting the paging file from your system, you can set your computer to create a new pagefile.sys file in a new location. This solution is best suited for cases where you have a different drive that matches or tops the performance of your hard drive.
Press the Windows key + I combination to open Settings.
Here, go to System > About. Next, click on the System info link under the Related settings area.

Select the Advanced system settings option on the left-hand pane.
Switch to the Advanced tab and click on the Settings button under the Performance area.

In the Performance Options window, click on the Advanced tab, and you’ll see the size of your paging file in the Virtual memory section. Hit the Change button here.
Unmark the checkbox for Automatically manage paging file size for all drives.
Click on the C: [System] drive, and with this selected, go down and choose the No paging file option. Hit the Set button.

Go back to the Drives and select the volume to which you want to store the paging file.
Scroll down, click on the System managed size for the drive, and hit the Set button. Finally, click on the Yes button on the prompt.
You have successfully disabled the paging file on your primary drive. However, I don’t advise that you do this because, with the paging file disabled, the system will no longer create crash dumps if there’s a system error.
The next step is to choose the drive on which you wish to store the paging file. From this same screen, click on this drive and select System managed size instead of No paging file as we did for drive C.
Hit the Set button and click Apply and Ok to close save your settings and close the window.
Finally, restart your machine.
Read: How to reset Virtual Memory or Page File in Windows
Set your computer to delete Pagefile.sys on every shutdown
Knowing that the page file is vital to your machine, you don’t want to run your computer without it.
However, the paging file poses a security risk because it’s carried over even after you restart your machine. A better way is to set your computer system to delete the paging file whenever it shuts down.
With these methods, your computer deletes the paging file whenever you shut it down, and on each restart, Windows creates a fresh paging file.
NOTE: Deleting the paging file on every shutdown and creating a new one on startup will slow down your shutdown and booting times.
When the Clear virtual memory pagefile setting is turned on, when the system shuts down, the computer may take longer to shut down than it usually takes. This behavior occurs because when this policy setting is turned on, the computer must physically write to each page in the pagefile to clear each page. The period of time that it takes for the system to clear the pagefile varies according to the pagefile size, and the disk hardware that is involved.
1] Ultimate Windows Tweaker

Download and use our freeware Ultimate Windows Tweaker to do so with a click. You will see the setting under Customization > File Explorer.
2] Using the Registry Editor

Press the Windows key + R to open the Run dialog box. In Run, type Regedit and click OK.
In the Registry Editor, navigate to the following folder:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
On the right-hand pane, double-click on the DWORD named ClearPageFileAtShutdown and change the Value data to 1. Hit the OK button to save the changes.
NOTE: If you don’t find this DWORD, right-click on the white space and create it from New > DWORD (32-bit) Value. Set the name to ClearPageFileAtShutdown and the Value data to 1.
Exit Registry Editor and restart your computer.
3] Using Group Policy Editor

Open the Run dialog box by pressing the Windows key + R combination.
Input gpedit.msc in the Run dialog box and hit ENTER.
In the Group Policy Editor, expand Computer Configuration on the left-hand pane.
Under Computer Configuration, go to Windows Settings > Security Settings > Local Policies > Security Options.
From the right-hand pane, right-click on Shutdown: Clear virtual memory pagefile and select Properties.
Choose Enabled from the new window and finally hit the Apply and OK buttons to save the configuration.
Again, I can’t overemphasize that deleting the paging file can be detrimental to your computer. However, if you have good reasons to do so, do it properly by following the above guide.