If it's just prophylactic - after a basegame update or troubleshooter recommendation - cleaning your installation and files every now and then isn't the worst idea. Modern download speeds make it quick, offering a true 'tabula rasa' reset when quick fixes fail.
This holds true especially for mod files: Steam commonly corrupts them via auto-updates. These issues can hide themselves from error logs, wasting troubleshooters' time on wrong leads. Re-download your full mod collection before troubleshooting - it's a key prep, and often requested as one of the first steps anyways, so no harm in coming prepared already!
RimWorld has a rather tiny footprint due to its DRM-free nature. Everything lives in just three main folders on your drive.
Game-Folder:
..\SteamLibrary\steamapps\common\Rimworld
The main location of the game files based on a Steam version of the gameis directly in your SteamLibrary. Other versions of the game (GoG, EGS, DRM-free, etc.) can be found in their respective locations which differ vastly. If you need help locating your base game install, better ask someone in our community!
Mod-Folders:
..\SteamLibrary\steamapps\workshop\content\294100
..\Rimworld\Mods
Mods can typically appear in two different locations. Mods downloaded via Steam would be put in their own folder within the SteamLibrary while mods downloaded by hand have to go into the Mods-folder directly within the game-folder.
User-Folder:
..\Users\YOUR_USERNAME\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios
All your config-files, saves, presets and similar files are in their own location which is safe from data-loss even when you re-install the whole game. At least on Windows those files can be found there - for any other OS ask specifically.
In most cases, manually deleting the three main folders is the cleanest way to wipe RimWorld - Steam's uninstall function often leaves junk behind and defeats the purpose. A list of files you potentially want to keep follows in the next section.
Game- & Workshop-Mods-folder:
Safe to nuke outright. No dynamic data lives there. Reinstall via Steam and everything (game + subscribed mods) redownloads fresh.
Local Mods-folder:
Delete if you want a true clean slate, but remember you'll need to re-add any non-Workshop mods afterward.
User-folder (config/saves):
The more tricky one. Saves, settings, and some mod data live here. Either delete only the locations above and leave this folder untouched, or back up what you want to keep (saves, certain mod config files), delete the whole folder, reinstall & run the game once, then copy your files back into place.
No universal rule exists on which user-files to keep - it depends entirely on your situation. Rule of thumb: delete anything not explicitly needed for the cleanest result. Often, just your latest save-file might be enough. But to continue an ongoing save, keep mod configs too - some mods might demand the exact prior settings to work correctly. Besides save-files, custom presets, and your ModsConfig.xml, everything else regenerates on first post-cleanup game launch.
Savegames
..\Users\YOUR_USERNAME\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\Saves
Vanilla Presets (xenotypes, starting-scenarios, ideologies, etc.)
..\Users\YOUR_USERNAME\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\Scenarios
..\Users\YOUR_USERNAME\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\Xenotypes
..\Users\YOUR_USERNAME\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\Ideos
Mod Presets (like exported characters with Prepare Carefully, Character Editor, etc.)
..\Users\YOUR_USERNAME\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\RocketMan
..\Users\YOUR_USERNAME\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\CharacterEditor
ModsConfig.xml (this contains your current modlist and loadorder)
..\Users\YOUR_USERNAME\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\Config
Mod Configurations (settings and configs for individual mods)
..\Users\YOUR_USERNAME\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios\Config
Player.log-file (the log-file of your current or last RimWorld session)
..\Users\YOUR_USERNAME\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios