anchor.diff:      end,
       fun(Idents, #state{ets=Ets}) ->
           ets:delete(Ets),
  -        lists:foreach(fun({Ident, _Arches}) -> caterpillar_utils:del_dir(Ident) end, Idents)
  +        [caterpillar_utils:del_dir(Path) || {Ident, Archs} <- Idents, {Arch, Branches} <- Archs, {Branch, Path} <- Branches]
       end,
   [
       {Idents, fun(_, State) ->
  
positive.code:     {Packages, fun(_, State) ->
          {Message, fun() ->
              Result = (catch caterpillar_deploy:rotate_packages(Deploy, State)),
              ?assertEqual(ok, Result),
              Check(State)
          end}
      end} || {Message, Packages, Deploy, Check} <- [
  
negative.code: copy_packages_test_() ->
  {foreachx,
      fun({Paths, #deploy{}}) -> 
          caterpillar_utils:ensure_dir("__test_packages"),
          [caterpillar_utils:ensure_dir(Path) || {_, Path} <- Paths],
          {ok, D} = dets:open_file("__test_dets.deploy", [{access, read_write}]),
  