Autoclean on unsuccessful installation

Also, should after-hooks be executed if installation fails? I can change.