“Again” is a script c ontributed by Eugene Wong to uninstall packages again, and again on a Gnu/Linux distribution. More exactly, this script is only for uninstalling rpms that the user *knows* he will never need. As far as the name is concerned, Eugene said that “Unless anybody has any suggestions, I’ll just call it, “Again”, because we need to keep uninstalling certain rpms after each installation, again, & again. I’m open to suggestions for the name”.
One thing that he wanted to do was store the rpm name without the version info. In other words, I personally would want Again to remember that hotplug is what we want to uninstall, not just hotplug-2001_04_24-11. If the version information is stored, then the next time your system is upgraded, Again will look for a package of that version and ignore the newer version, defeating the purpose of using Again. Again takes advantage of rpm’s –qf option (which is the same as the --queryformat
option) which allows Again to figure out the package name without the version info. In this example it will “rpm -e” the hotplug rpm regardless of the version.
On the mailing list, it was decided to just take the packages list from Slinky and comment out everything by default. Unfortunately the idea made it very difficult to keep the list immune to version changes, & very difficult to add to it without making it too long. Since the user is supposed to know for sure what isn’t needed, then it would be wise to capitalize on this & pass the responsibility on to him. He should find out ahead of time if he needs it, then he uses Again, then it gets added to a list & uninstalled. To uninstall all packages in the list, the user should just type
again -a
This will use rpm -e
for each package in the list. This option is good for new installations, upgrades, or when large groups of packages are installed all at once. To uninstall or erase a package, the user should just type
again -e foobar
This will add foobar to /var/db/again.lst and then proceed to execute rpm -e foobar
. To list the files in /var/db/again.lst, just type, again -l
.
TODO list for the Again script
There are still a few things that need to be done.
- Add long option support. In other words, the user should be able to type, “again –erase foobar” or “again -e foobar”. He should be able to choose whichever he prefers, instead of just “again -e foobar”. If we add this, it should be considered a bug fix, not adding of features
- It may be good to have a “compile” script that will customize this for other package managers, & to remove comments, to keep the file small.
- There may need to be some more error checking in some cases. It’s good enough for most people, though. If we add this, it should be considered a bugfix, not adding of features.
Any suggestions are welcome. For the most part, as far as I can tell, this is basically finished. Other needs could probably be met by making more software packages. To download the again script, click here.