Forum Discussion

domtrump's avatar
domtrump
Helper II
1 year ago
Solved

Move PBI Desktop to different drive

My C: drive is full so I'm moving whatever I can to 😧 drive. I uninstalled PBI Desktop from C and then reinstalled to D. When I uninstalled from C, it freed up a good chunk of space. When I reinstal...
  • grazitti_sapna's avatar
    1 year ago

    Hi domtrump,

     

    Power BI writes a lot of working data and temp files under your Windows User Profile, which is always on C: drive.

    You can move the temp folders to D drive but Even after moving TEMP, Power BI internal cache for model processing will always write some files under your User Profile (C drive). It's baked into how Windows handles per-user app data.

     

    I suggest you can create a batch file to remove the Temp Files and folders to save space on C drive, Below is the code 

    @echo off
    echo Clearing ONLY Power BI Desktop cache...

    REM Delete Power BI Desktop cache
    rmdir /s /q "%LocalAppData%\Microsoft\Power BI Desktop"

    REM Recreate empty folder (optional but recommended)
    mkdir "%LocalAppData%\Microsoft\Power BI Desktop"

    echo Power BI Desktop cache cleared and folder reset!
    pause

     

     

    • Open Notepad

    • Paste the script above

    • Save as βž” Clear_PowerBI_Cache.bat

    • Save as type: All Files (*.*)

    You can schedule this batch file to run after certain time or at the time when you login into your system by 

     

    • Open Task Scheduler

    • Create new task

    • Trigger: Daily, at login, or every few hours

    • Action: Run Clear_PBI_Cache.bat

    Please note 

    • This deletes cache, so Power BI Desktop will rebuild previews when opening datasets again (small delay).

    • It won't harm your actual .pbix files or work β€” only temporary data gets deleted.

    • If you have unsaved work open, save it first before running the script.

    🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
    πŸ’‘ Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
    πŸŽ– As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
    πŸ”— Curious to explore more? [Discover here].
    Let’s keep building smarter solutions together!

     

     

     

  • domtrump's avatar
    domtrump
    1 year ago

    Thanks for the info. Looks like that folder only has 46MB in it. Not sure what is taking up the rest of the 3 GB that got eaten up on my C drive. I will uninstall and use a different PC for Power BI dev. I appreciate your response and will keep this information for future reference.