Cleaning up after the Windows Azure Command Line Tools for PHP

June 2, 2011

NOTE: The Windows Azure Command Line Tools for PHP project on CodePlex has been deprecated and new tools created in the Windows Azure SDK for PHP, however this issue still persists and seems like it may be from the Windows Azure tools instead of the PHP tools.

 

With the sizes of hard drives these days I rarely monitor free space on my drive, that is however until one morning when Visual Studio 2010 updates continually failed to install. I noticed it because during the install my hard drive would be thrashing like crazy and using all available I/O, which essentially locked me out of my machine. It turned out that my drive had only 100 megabytes of free space! The workstation was pretty clean as it is only used for Windows Azure development so I was confused as to the reason for no free disk space. I finally traced it down to the Windows Azure Command Line Tools for PHP.

The tool creates a temporary directory where it stores the package it is building. As it turns out the tool works great for building packages, but like a 3 year old is terrible at cleaning up after itself. As I am writing this I again checked the temporary directory and with only 58 deployments the tool has sucked up 61 gigabytes of my hard drive space! Luckily I can safely reclaim all the lost space by simply deleting the files. You may want to check this location and remove any files if you are experiencing a large loss of disk space as well.

To find the temporary files:

  • Open Windows Explorer
  • Navigate to the AppData folder in your user directory
  • Open the Local folder
  • Here you should see a folder dftmp. It contains the temporary files.
  • Delete the dftmp folder

Viola! 61 gigabytes reclaimed just like that.

Now don’t forget to check the temporary folder again later!

Learn more about running PHP on Windows Azure at http://azurephp.interopbridges.com

2 thoughts on “Cleaning up after the Windows Azure Command Line Tools for PHP

  1. HItesh Kewalramani (November 5, 2013)

    Is there any way in which we can automate this process of cleaning up the dftmp folder as and when a deployment is removed/destroyed? I am experiencing varying behavior across different machines. On one machine, the folders get deleted and one machine they do not and simply keep on eating up space.

    1. Ben Lobaugh (blobaugh) (November 6, 2013)

      I do not know how you are building your packages, but if your tool is not removing them as is should you could add it in at the end of your build script.