Using a computer for a long time often leads to slow performance, full storage, or system errors. One of the main causes is the accumulation of junk files – including temporary files, caches, error logs, or unnecessary data from uninstalled software. Cleaning up junk files not only helps reclaim disk space but also improves the overall performance of the computer.
In this article, we will explore step-by-step, easy, and safe methods to clean junk files on a PC (Windows).

1. Use the built-in cleanup tool of the operating system
Operating System | How to do it | Detailed steps | Tips / Notes |
---|---|---|---|
Windows | Method 1: Disk Cleanup (all versions) |
|
|
Method 2: Storage Sense (Windows 10/11) | 1. Windows + I → Settings → System → Storage.2. Bật Storage Sense.3. Vào Configure Storage Sense or run it now.4. Chọn thời gian xóa file tạm & thùng rác (ví dụ 30 ngày).5. Nhấn Clean now để chạy ngay. |
| |
macOS | Storage Management |
|
|
General Notes
- For machines with limited storage, it is recommended to enable the automatic cleanup feature to avoid manual actions each time.
- Always check before deleting: Especially for “Previous Windows installations” or downloaded files, as they cannot be restored once deleted.

2. Clean the Recycle Bin
When you delete files on Windows, they are usually still stored in the Recycle Bin and take up disk space.
To clean quickly, right-click on the Recycle Bin icon on the Desktop → select Empty Recycle Bin → confirm. If you want to delete specific files, open the Recycle Bin, select the files to delete, and press Delete, or choose Restore to recover them. You can go to Properties to limit the bin’s storage size or enable the option to delete files permanently without storing them here.
3. Manually delete temporary files in the Temp folder

Windows often stores many temporary files (cache, logs, installation files) in the Temp folder, which can take up a lot of space over time. You can delete them to free up disk space:
How to do it:
- Press
Windows + R
, type%temp%
→ Press Enter. - Select all files in the folder that appears (
Ctrl + A
) → PressDelete
. - Do the same for
C:\Windows\Temp
if you have admin rights.
Note: Some files currently in use by the system cannot be deleted — choose “Skip” when you encounter a notification. This does not affect Windows as these are just temporary files, but you should close any running applications before cleaning to delete more files.
4. Uninstall unused software
Unused applications not only take up disk space but can also run in the background, slowing down your system. Uninstalling them helps optimize the system:
- Windows 10/11: Open Settings → Apps → Apps & Features, select the unwanted application → Uninstall.
- macOS: Open Finder → Applications, drag the unwanted application to the Trash, then Empty Trash to permanently delete it.
Tip: On Windows, you can use third-party software like Revo Uninstaller for a complete uninstallation. On macOS, if you want to delete leftover configuration files, use a tool like AppCleaner.
5. Clean up the browser
Browsers like Chrome, Firefox, and Edge often store a lot of cache and cookie data.
How to do it with Google Chrome:
- Go to
Settings
→Privacy and security
→Clear browsing data
. - Select the types of data to delete: cached images, cookies, history…
- Click Clear data.
6. Use dedicated cleanup software
If you want to save time and automate the cleanup process, you can use dedicated software. These tools help delete temporary files, clear cache, optimize the registry (Windows), completely uninstall software, and even optimize system startup.

Some popular options:
- CCleaner (Windows, macOS): Simple interface, supports cleaning temporary files, browser history, and the registry. Available in both free and Pro versions.
- BleachBit (Windows, Linux, macOS): Open-source, lightweight, ad-free, and supports a wide range of applications.
- Glary Utilities (Windows): A comprehensive optimization suite, featuring a startup manager, defragmentation, and junk file cleaner.
- Advanced SystemCare (Windows): User-friendly interface, with features for system acceleration and protection.
Note
- Only download software from the official website to avoid malware.
- When cleaning the registry or system files, it’s recommended to back up first to avoid errors.
- Do not overuse; running it once or twice a week is sufficient.
7. Check and optimize the disk (Defragmentation)
On HDDs, data can become fragmented, causing the read/write head to move more, which slows down access speeds. Defragmentation rearranges the data to improve read/write performance.
How to do it on Windows:
- Open Start → type Defragment → select Defragment and Optimize Drives.
- Select the HDD you want to optimize → click Optimize.
- Wait for the process to complete (it may take from a few minutes to several hours, depending on the size).
Note:
- Make sure the computer is continuously powered during the optimization process.
- Only applicable to HDD. SSDs do not need (and should not) be defragmented because they have a different access mechanism; just Optimize them using the TRIM command.
- Only applicable for HDD. SSDs do not require (and should not be) defragmented as they have a different access mechanism; just Optimize using the TRIM command.
8. Manage the size of System Restore
System Restore saves system snapshots, but if left at the default settings, they can take up several GBs of space.
- Control Panel → System → System Protection → Configure → reduce the maximum size or delete old restore points.
Note: You should only reduce the size, not disable it completely, to ensure you can still restore the system if needed.
Tips to optimize computer performance

Clean your computer regularly
Dust buildup in the cooling fan, vents, and keyboard not only causes the computer to overheat but also reduces performance and shortens the lifespan of components. You should clean it regularly:
- Clean environment with little dust: Every 6–12 months.
- Dusty environment or pet owners: Every 3–6 months.
- Heavy usage (gaming, rendering, etc.): Every 3–4 months.
When cleaning, turn off the machine, unplug the power source, use compressed air or a soft brush to remove dust, and wipe the screen and keyboard with a microfiber cloth. For desktop PCs, you can open the case for a more thorough cleaning and replace the thermal paste on the CPU/GPU every 1–2 years.
Update the operating system and drivers
Always keep Windows/macOS and drivers for graphics cards, audio, network, etc. up to date to ensure optimal performance and security patches.
Manage startup programs
Disable unnecessary startup programs to shorten boot time and save RAM.
- Windows: Task Manager → Startup tab.
- macOS: System Settings → Login Items.
Upgrade hardware
- Add more RAM if your system often runs out of memory.
- Replace HDD with SSD to speed up startup and application loading.
Protect against viruses and malware
- Install reliable antivirus software (Windows Defender, Malwarebytes, Bitdefender, etc.).
- Perform regular scans to prevent malware from consuming system resources.
Optimize battery (laptop)
- Avoid letting the battery drop to 0% or charging it continuously at 100% for extended periods.
- Use battery saver mode when performing light tasks.
Conclusion
Cleaning up junk files on your computer is an important habit that helps extend the device’s lifespan and ensures stable performance during use. With the above steps, you can safely and effectively clean your system without needing advanced technical knowledge. Maintain this regularly (weekly or monthly) to keep your machine running smoothly.
If you are using your computer for work, study, or gaming, maintaining a clean and optimized system will save time and prevent many unexpected errors.