Cleanup - James Montemagno https://staging.montemagno.com/tag/cleanup/ https://staging.montemagno.com/content/images/2017/08/MonogramIcon_Orange_NoBuffer.png Cleanup - James Montemagno https://staging.montemagno.com/tag/cleanup/ Hugo -- gohugo.io Tue, 13 Oct 2026 23:21:57 GMT 60 Easily Clean Bin/Obj Folders https://staging.montemagno.com/easily-clean-bin-obj-folders/ 598df8f2c121b60019bf305c Mon, 07 Aug 2017 18:42:00 GMT In an earlier blog post I talked about how to clean up space on your Xamarin Developer machine by deleting old installations, NuGet cache, and Android junk sitting around. We can take it one step further and delete all of that clutter that is built up in the bin/obj folders! This can be gigs of data. Here is my GitHub folder:

Inside of each of my repo folders sits code and the bin/obj folders from each build, which can be very large as it contains the full excecutable. What we can do is write a simple powershell script on Windows to recursively delete all of those nasty folders.

Boot up powershell in admin mode and **_navigate to the root of your repos.

THIS IS VERY IMPORTANT: DO NOT RUN THIS COMMAND IN A SYSTEM FOLDER OR TERRIBLE THINGS WILL HAPPEN.

I am serious about this, make sure you do this in a sub folder. Mine is C:\GitHub.

Then run this command:

Get-ChildItem .\ -include bin,obj -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }

Now we can check that folder size again:

Amazing! Removed 10GB of build up! Amazing! Looking to do it on macOS? Check this guide from Joe Sauve.

]]>
Cleaning Up Space on Your Xamarin Development Machine https://staging.montemagno.com/cleanup-up-space-xamarin-dev-machine/ 598df8f2c121b60019bf2fd0 Fri, 17 Mar 2017 19:10:51 GMT Today, I officially uninstall Visual Studio 2015 and upgrade to Visual Studio 2017!! Whenever I do a major upgrade I usually re-format my machine and get a fresh install, but this time I decided not to and just uninstall and clean up my machine as best as I can. While VS 2015 for sure installs tons of stuff all over the place and I can manually uninstall things, I figured it was a good time to help developers clean up space on their machines. I do this every few months because there are always new upgrades, nugets, and android packages that are cached around.

NuGet

This is the first thing I blow away because I don’t need 5GB of packages cached! Head to:

  • PC: C:\Users\%USERPROFILE%\.nuget
  • Mac: ~/.nuget/packages & ~/.local/share/NuGet

Delete it all! Now all your packages will be re-downloaded.

Android Library Cache

When you install a support package or google play service previously, a ton of files had to be downloaded. Now things are really small, but all versions ever are cached around on your machine, which is a good thing, but let’s purge!

  • PC: C:\Users\%USERPROFILE%\AppData\Local\XamarinBuildDownloadCache
  • PC: C:\Users\%USERPROFILE%\AppData\Local\Xamarin
  • Mac: ~/.local/share/Xamarin (basically all other mac stuff is in here)

You can blow away anything that starts with Xamarin.___ and zips:

Android SDKs

Xamarin only installs SDKs and emulators that you need, but that doesn’t mean that you went in and installed everything. Groom and delete old APIs that you no longer need. You can always re-download from the sdk manger. DO NOT delete the entire directory, only specific platform sdks and avd images.

  • PC: `C:\Program Files (x86)\Android\android-sdk`

Hidden Visual/Xamarin Studio Download Cache

When you download updates in older VS 2013/2015 there is a folder where downloads are cached that you can go and clean up. I had a few gigs in there

  • PC: `C:\Users\%USERPROFILE%\AppData\Local\MonoDevelop-4.0\Cache\TempDownload`

  • Mac: `~/Library/Caches/XamarinStudio-6.0/TempDownload`

  • Mac: `~/Library/Caches/VisualStudio/7.0/TempDownload`

There you go, this should get you pretty far to a cleanup of random files you probably don’t need or will just get re-downloaded :)

]]>