Demerge

About Demerge
Demerge is a portage utility to create a snapshot of all the packages that installed in the computer in that current time.

The benefit of having a snapshot in portage is the ability to go back to previous state of installed package without the hassle of removing manually and the problem of deleting needed dependencies package.

Imagine this, you decided to install a large package such as gnome and KDE but due to whatever reasons after completed the installation you didnt like the packages installed, without demerge you will have to remove the package installed along with all of its dependencies one by one.

Installation
Start by emerging demerge:

Using Demerge
Demerge has several options that you can use:

--comment [ comment ]      : Add comment to state for your convenience. --do                       : Do not ask user to confirm actions - just do it. --dir [ directory ]        : Select directory to store/get demerge data. -h, --help                 : Show this help. -k, --usepkg               : Pass -k to emerge so that binary packages : will be used when available. When enabling this : option demerge will also create binpkgs of                            : packages before removing them. : (Note: Currently --usepkg is not useflag aware. So                            : no matter what useflags were set in the system-state                             : portage will install the binpkg as is.) -C, --nocolor              : Turn off colors. --record                   : Records which packages are installed : on this system. --restore [ timestamp ]    : Restores previous recorded system-state of the given : timestamp. --restore-previous         : Restores previous recorded system-state. --wipe [ timestamp ]       : Remove all/given system-states. --wipe-older [ timestamp ] : Remove all recorded system-states that are : older than the given timestamp.

Creating a snapshot point
...... * Using datadir: /root/.demerge

* Recording current system state...... done * To restore the system-state run 'demerge --restore 1232478682'.

Restoring the snapshot point
Demerge Demerge