refactor: Rename functions in Base.history_undo.
refactor: Move obsoleted packages handling within Base.history_undo.