################################################################ # Searchable Ketwords: update up2date rpm ------------------ This from the RedHat support page ----------------- Tips and Tricks Featured Article: Using the Update Agent (up2date) from the command line April 2003 You've heard it before. Real sys admins do it on the command line. That goes double for whiz-bang, web-based software management systems. But maybe you can have the best of both worlds. This month we take a look at Using the Update Agent (up2date) from the command line. up2date is a complete system for managing and updating RPM packages on Red Hat Linux system. It has both command line and gui modes. For the purposes of this article, we'll assume that you're connected to the Internet and already have a Red Hat Network account: [user@localhost user]$ up2date --register Since we're covering the comand line, we assume you are running in text mode. If you are in the desktop environment and would like to follow along in a terminal, just add –nox to the following commands. You can change any of the default configuration settings, such as which packages to ignore, enabling package rolbacks with 'up2date-config'. This will produce a list with current settings. Type the number of any setting you wish to change. For example: [user@localhost user]$ up2date-config 0. debug No 1. rhnuuid 38e8d384-589b-11d7-9124-00096be0a8c5 2. isatty Yes 3. showAvailablePacka No 4. depslist [ ] 5. networkSetup Yes 6. retrieveOnly No 7. enableRollbacks No 8.pkgSkipList ['kernel*'] 9.storageDir /var/spool/up2date ... 31. httpProxy 32. headerCacheSize 40 33. forceInstall No 34. noReboot No Enter number of item to edit : You would type '7', then 'Yes', then [enter] to enable rollbacks. Or you could type '8', and add mozilla*; to the list, or remove the kernel* packages. You might want to just update a particular package for now and wait on any others: [user@localhost user]$ up2date mozilla This will just grab and install newer Mozilla packages. Let's say you want to update everything you have available and automatically resolve dependencies. Just type: [user@localhost user]$ up2date -u (or –update) You can download the packages without installing them: [user@localhost user]$ up2date -d (or –download) This will put the packages in /var/spool/up2date (or whatever you specify in 'up2date-config', line 9.) If you just want to check for available updates and test: [user@localhost user]$ up2date –nodownload Add a '--dry-run' and you will see an output of all available downloads with dependencies. You may keep a local directory of packages yourself. You can ask up2date to look for these first: [user@localhost user]$ 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 with: [user@localhost user]$ up2date –show-channels And install everything from a particular channel with: [user@localhost user]$ up2date –install-all –channel channel_name Up2date can even tell you packages that are installed but that aren't in any channel: [user@localhost user]$ up2date –show-orphans There are of course other things you can do with up2date from the command line. Type 'up2date -h' or 'man up2date' and see for yourself. Next month, we'll get further into the joys of the Red Hat Network with a look at the Update Agent gui. NOTE: I would think that this would also apply to other OSs as well. ---------- My most useful use of up2date to date ------------ This is what I used to update all the RPMs on a 2ghz 1gig memory Fedora install. up2date --nosig <-- nosig allows the download and install without going interactive everytime there is no gpg signature.(bothersum). or up2date (packagename) <-- to update a single RPM package This worked after I messed up my Fedora core 2 machine by upgrading XF86 It downloaded the packages, installed them and upgraded the entire machine including XF86. up2date -u --update --nosig -i ---------------------------------------------------------------------------------- The /var/spool/up2date directory From a mailing list................................ On Wed, 20 Aug 2003, Orville Smith wrote: > Since I reinstalled my Redhat Linux 8.0, this apparently confused Red Hat > Network and it installed a bunch of packages > that made things a lot worse. To fix it, I had to do another install, then, > as stated in the FAQs, delete my RHN profile. > > There currently are a lot of undesirable RPMs in my /var/spool/up2date > directory. Can or should I delete everything in this > directory before creating a new RHN Profile? I have not deleted > /etc/sysconfig/rhn/systemid yet, but will do it before I > create the new profile. You can safely delete entries from /var/spool/up2date (at the expense of having to re-download the needed packgaes next time). If you have a fast connection, it probably won't hurt that bad. You don't have to remove /etc/sysconfig/rhn/systemid; forcing the registration will do that for you. .......................................and more on up2date My 583MB /var partition is 88% full, with a large chunk of that 88% being in the /var/spool/up2date directory. Is there a procedure for cleaning out the up2date directory? The /var/spool/up2date directory should contain .rpm files and .hdr files. I am 99% confident that nothing you delete will hurt the up2date process (and I am 100% sure that you won't damage the RPM database). I suggest you simply delete the .rpm files (which take up all the space) and leave the .hdr files since these are what up2date uses to determine what updates are available, what they depend on, and whether you need them. -----------------------------------------------------------------------------------