It's all about the answers!

Ask a question

How to remove IBM Installation Manager repository references using command line script?

Stefan Kahlhöfer (6111) | asked Nov 03 '14, 5:11 a.m.
Hi guys,

I am silently installing and uninstalling IBM products using the Installation Manager. Therefore my scripts call the imcl command line tool and use response files as well:
:[installPath]:[/]eclipse:[/]tools:[/]imcl -input :[responseFile] -acceptLicense -log :[logFile]

The repositories e.g. their locations are defined in the used response files and I know the attribute
<repository location="..." temporary="true" />
to make Installation Manager not adding the repository to its registry during installation.
But what I want resp. have to do is remove existing repository references after uninstalling a software those installation repository was not temporary.

Repository references are stored in /var/ibm/InstallationManager/.settings/ which may look like


I want to avoid complex file hacking removing the references with sed or awk but I couldn't find any documentation on how to do this with IM command line tools as well.
Any ideas on how to solve my problem?

Thanks in advance!

2 answers

permanent link
Dave Hay (21) | answered Sep 03 '15, 2:28 p.m.
For me, I just use the command-line interface for IBM Installation Manager: -

/opt/IBM/InstallationManager/eclipse/tools/imcl -c

and navigate to P ( Preferences ), 1 (Repositories) from which one can add/remove repositories.

The use of temporary="true" in a response file is an EXCELLENT tip, thanks to Stefan :-)

Cheers, Dave

permanent link
Stefan Kahlhöfer (6111) | answered Nov 04 '14, 2:29 a.m.
As I am more and more positive that there isn't such a supported function in the Installation Manager tools, I implemented a little workaround:
The idea is to parse a response file from the current configuration file, filter the repository reference to remove and re-import the configuration using the imcl tool.
This can be done using this small shell/awk script:
# Remove a repository reference from the Installation Manager repository registry.
# Author: Stefan Kahlhoefer
# Version: 20141103
# Repository path to remove should be given as first command line parameter.

# Get path to IM configuration file configPath=$(/usr/bin/awk -F '=' '/^cic.appDataLocation=/ { print $2 }' < $installPath/eclipse/configuration/config.ini) configFile="$configPath/.settings/" tempResponse=$(/usr/bin/mktemp) # Parse response file from current configuration /usr/bin/echo "Parse response file from current configuration $configFile..." /usr/bin/awk -F '=' ' BEGIN { print ""; print "" } /^\/\// { # ignoring comments / options for open and closed repositories in config file next } # Parse repository references if they are not the path to remove /^ { sub(/file\\:\/\//, "", $2); if ( $2 == "$repositoryPathToRemove" ) next else print ""; } # Parse all other preferences ! /^ { print ""; } END { print ""; }' < $configFile > $tempResponse # Import new configuration /usr/bin/echo "Import new configuration using response file $tempResponse..." $installPath/eclipse/tools/imcl input $tempResponse rm -f $tempResponse

Your answer

Register or to post your answer.