First Things First
On modern systems with SSD’s, cleaning your drives IS NOT A PERFORMANCE TWEAK unless your drive is near full. SSDs do not get fragmented and Windows not only periodically cleans system files but also automatically optimizes drives (TRIM).
You clean a drive to reduce its size resulting in quicker backup and recovery and a smaller image.
The modern tool you would use is “Disk cleanup recommendations” which leads to Settings > System > Storage. I don’t find this remotely useful. Aside from the old Disk Cleanup I use third party tools mostly.
Press the Windows + R keys and type cleanmgr
or type disk cleanup in the Search box
(You can also launch this for any drive from Windows Explorer > drive root > Manage tab > Cleanup button)

Or
Press the Windows + S keys . type cleanup

Anywho, type cleanmgr and click OK
OR
If you want to customize Disk Cleanup you can run cleanmgr /sageset:n (where n is any number from 0 to 65535, I always tend to use 50. Don’t know why, just do.)
You’ll follow that up woth cleanmgr /sagerun:n
This allows you to not only run this command at will, but it can be added to scheduled tasks or used in a 3rd party app like Cleanmgr+.

Choose the drive you wish to clean (usually C: for your OS drive) and click OK.

Choose your options. As of this writing they are:
Main Section:
Downloaded Program Files
Temporary Internet files
DirectX Shader Cache
Delivery Optimization Files
Recycle Bin
Temporary files
Thumbnails
“Clean up system files” section
Windows Update Cleanup
Previous Windows installations (if Windows.old exists)
Windows Defender Antivirus
Windows upgrade log files
Device driver packages
Language Resource Files
Clicking on each option will give you a description of what it is.
More Options Tab
Cleaning restore points. Be sure!

Official Documentation From Microsoft:
Windows Commands > cleanmgr
Automating Disk Cleanup tool in Windows
Microsoft – Free up drive space in Windows
Delete your previous version of Windows
“Tha-Tha-Tha That’s all, folks!”



Comment Policy:
-You do not need an account or login to anything to comment.
-Comments are not posted until moderated and are filtered using Akismet among other things.
-NO POLITICS (unless post is political in nature.)
-Comments are closed after a time to cut down on spam.
-In addition the following comments will be deleted: trolling, posted in the wrong topic, bashing other people, profanity, links to adult or other questionable sites.
-Once you click submit your IP address is recorded (it is NOT posted...unless, perhaps, you violate the rules). FYI - All sites do this, I just tell you about it.
-The comment section is not a way to contact me. See here for that.
-In the end it is my site and not a public forum. I will decide what I do and do not want posted here.