Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think I'm going to answer this myself.

I will be using tidy resource. I can use age, rmdirs attributes to delete the old files. In my case, this is easier because the binaries I'm installing all go into a specific location. So, after the upgrade I can rename the directory and delete the directory after certain age.

tidy { 'resource title':
  path    => # (namevar) The path to the file or directory to manage....
  age     => # Tidy files whose age is equal to or greater than 
  backup  => # Whether tidied files should be backed up.  Any...
  matches => # One or more (shell type) file glob patterns...
  recurse => # If target is a directory, recursively descend...
  rmdirs  => # Tidy directories in addition to files; that is...
  size    => # Tidy files whose size is equal to or greater...
  type    => # Set the mechanism for determining age. Default...
  # ...plus any applicable metaparameters.
}