My computer's C drive has always had very little memory, which always affects the use. The following is a very effective cleaning method I have tried, self-collection.
Method 1: Turn off hibernation [clean up hiberfil.sys]
After the computer turns on the sleep function, the system automatically generates a memory image file, so that everyone can quickly start the program after waking up the computer. However, hibernation has a disadvantage, that is, it will take up most of the system disk space (about 3 G), this file is in the root directory of the C drive, named [hiberfil.sys], we can turn off hibernation to save the C drive of disk space.
step
1. Right-click the icon in the lower left corner of the computer and select [Windows PowerSell (Administrator) A]
2. In the page that appears, directly input: powercfg -h off
(note the space), and then press the [enter] key on the keyboard.
powercfg /a //查看当前系统中的睡眠状态
3. Now there is no [hiberfil.sys] file in the C drive, and immediately release about 3G disk space for the C drive.
Method 2: Clean up temporary files
Step 1: Press the [win+r] combination shortcut key at the same time to open the running window, enter the code [%TEMP%] in the box, and press Enter.
Step 2: At this point, you will see the trash on the C drive, select all of them at this time, or press the shortcut key [Ctrl+A], and finally press the Delete button to delete the C drive trash.
Method 3: Code cleanup file
Create a new text document and enter the following code.
@echo off
echo正在清除系统垃圾文件,请稍等......
del /f /s /q %systemdrive%\*.tmp
del /f /s /q %systemdrive%\*._mp
del /f /s /q %systemdrive%\*.log
del /f /s /q %systemdrive%\*.gid
del /f /s /q %systemdrive%\*.chk
del /f /s /q %systemdrive%\*.old
del /f /s /q %systemdrive%\recycled\*.*
del /f /s /q %windir%\*.bak
del /f /s /q %windir%\prefetch\*.*
rd /s /q %windir%\temp & md %windir%\temp
del /f /q %userprofile%\cookies\*.*
del /f /q %userprofile%\recent\*.*
del /f /s /q "%userprofile%\Local Settings\Temporary Internet Files\*.*"
del /f /s /q "%userprofile%\Local Settings\Temp\*.*"
del /f /s /q "%userprofile%\recent\*.*"
echo清除系统LJ完成!
echo. & pause
Save it as xx(file name).bat format.
When you need to clean up, double-click the bat file.
Method 4: Use Storage Sense
1. Directly search for [Storage Sense], or you can find it in [Settings], select [System], and select [Storage].
2. Turn on the [Storage Sense] switch.
3. Set [Run Storage Sensing] to every day, and [Recycle Bin] and [Download] to the time you want to set.
4. Change where new content is saved.
5. Change to where you want to place it.
reference link
1. https://zhuanlan.zhihu.com/p/74793683