up2date - Red Hat Update Agent

up2date the Red Hat Update Agent, is a utility used by older versions of Red Hat Enterprise Linux, CentOS and Fedora Core that downloads and installs new software, updates existing packages and upgrades the operating system. It functions as a front-end to the RPM Package Manager and adds advanced features such as automatic dependency resolution.

The file /etc/sysconfig/rhn/sources specifies where up2date will search for packages.

By default, Red Hat Enterprise Linux's up2date retrieves packages from a Red Hat Network (RHN) server, users can however add directories containing packages or even Debian and yum repositories if they wish.

To update everything you have available and automatically resolve dependencies
up2date -u (or –update)

To just update a particular package
up2date mozilla
This will just download and install newer Mozilla packages

You can download the packages without installing them
up2date -d (or –download)
This will put the packages in /var/spool/up2date (or whatever you specify in 'up2date-config', line 9.)

To just check for available updates and test
up2date –nodownload
Add '--dry-run' and you will see an output of all available downloads with dependencies

To ask up2date to use a local directory of packages first
up2date -k (or –packagedir)
This will be followed by a colon delimited list of directory paths to check before attempting to download newer ones

Find out what channel(s) you are currently subscribed to
up2date –show-channels

To install everything from a particular channel
up2date –install-all –channel channel_name

Up2date can show packages that are installed but that aren't in any channel
up2date –show-orphans

Using a proxy

Add the correct proxy to the file /etc/sysconfig/rhn/up2date eg

enableProxy[comment]=Use a HTTP Proxy
enableProxy=1
httpProxy[comment]=HTTP proxy in host:port format, e.g. squid.redhat.com:3128
httpProxy=http://ip-address:80

How to Enable Rollbacks

up2date-config

0.  adminAddress       ['root@localhost']
1.  debug              No
2.  disallowConfChange ['noReboot', 'sslCACert', 'useNoSSLForPackages', 'noSSLSe
3.  enableProxy        Yes
4.  enableProxyAuth    No
5.  enableRollbacks    No
6.  fileSkipList       []
7.  forceInstall       No
8.  gpgKeyRing         /etc/sysconfig/rhn/up2date-keyring.gpg
9.  headerCacheSize    40
10. headerFetchCount   10
11. httpProxy          http://10.18.96.4:80
12. isatty             Yes
13. keepAfterInstall   No
14. networkRetries     5
15. networkSetup       Yes
16. noBootLoader       No
17. noReboot           No
18. noReplaceConfig    Yes
19. noSSLServerURL     http://xmlrpc.rhn.redhat.com/XMLRPC
20. pkgSkipList        ['kernel*']
21. pkgsToInstallNotUp ['kernel', 'kernel-modules', 'kernel-devel']
22. proxyPassword
23. proxyUser
24. removeSkipList     ['kernel*']
25. retrieveOnly       No
26. retrieveSource     No
27. rhnuuid            e44b6a64-8592-11dd-8253-000c29f9c8d3
28. serverURL          https://xmlrpc.rhn.redhat.com/XMLRPC
29. showAvailablePacka No
30. sslCACert          /usr/share/rhn/RHNS-CA-CERT
31. storageDir         /var/spool/up2date
32. systemIdPath       /etc/sysconfig/rhn/systemid
33. updateUp2date      Yes
34. useGPG             Yes
35. useNoSSLForPackage No
36. useRhn             Yes
37. versionOverride


Enter number of item to edit : 5
Attribute Name: enableRollbacks
Comment: Determine if up2date should create rollback rpms
Current value: No
New Value: Yes

In addition enable command-line RPM rollback by adding the line %_repackage_all_erasures 1 to /etc/rpm/macros

To list the different known rollback targets, type
up2date --list-rollbacks

To undo a transaction, use the --undo option, which undoes the last transaction that was installed
up2date --undo

In addition you can rollback an rpm to a previous state by performing an rpm update with the –rollback option followed by a date/time specification eg
rpm -Uhv –rollback '7:00 am', rpm -Uhv –rollback '3 hours ago', rpm -Uhv –rollback 'april 12