 <p>If you <em>uninstall</em> packages, then you run the risk of removing things that were already there, but happened to be upgraded. As a rule, you should use <code>yum</code> (or equivalent) for managing packages, which allows you to <em>downgrade</em> a package. This would remove new packages, and downgrade existing ones. See for example <a href="https://access.redhat.com/solutions/158973" rel="nofollow">How to safely downgrade or remove glibc with yum and rpm</a></p> <p>Selecting the names of packages to downgrade can be done using the output of <code>rpm -qa</code>, formatted to allow simple selection of the given date. For instance (see <em><a href="http://unix.stackexchange.com/questions/2291/centos-list-the-installed-rpms-by-date-of-installation-update">CentOS: List the installed RPMs by date of installation/update?</a></em>), you can list packages in the reverse-order of their install date using</p> <pre><code>rpm -qa --last </code></pre> <p>As a more elaborate approach, you can use the <a href="http://www.rpm.org/wiki/Docs/QueryFormat" rel="nofollow"><code>--queryformat</code></a> option with the <code>:date</code> option to format the date exactly as you want (it uses <a href="http://man7.org/linux/man-pages/man3/strftime.3.html" rel="nofollow"><code>strftime</code></a>).</p> <p>In either case, you can make a script to extract the package names from the output of <code>rpm</code>, and use those packages with <code>yum</code> (or even <code>rpm</code>) to manipulate as needed.</p> <p>When doing a downgrade, there is one odd thing to keep in mind: that revises the install-date for packages to be the <em>current date</em> rather than a complete undo, by using the previous date.</p>