can be a good idea to define dirscleanup outside installPackages function, so it can be used also in _fetchPackages