Difference between revisions of "Removing Solaris Packages Non-Interactively"
(Created page with "So you've installed a bunch of packages that you no longer want and you want to remove them all without having to type yes to everything. 'pkgrm' by default uses an admin file t...") |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 15: | Line 15: | ||
3. When you perform the package removal operation, give 'pkgrm' the following parameters: | 3. When you perform the package removal operation, give 'pkgrm' the following parameters: | ||
− | pkgrm -n -a /path_to_edited_default_file/default | + | pkgrm -n -a /path_to_edited_default_file/default ''pkgname1 pkgname2 pkgname3.....'' |
where | where | ||
− | -n means non-interactive | + | '''-n''' means non-interactive |
− | -a ''file_name'' means use an alternate admin file. | + | '''-a ''file_name''''' means use an alternate admin file. |
It should now remove all the packages you specify without annoying you for interaction :-) | It should now remove all the packages you specify without annoying you for interaction :-) | ||
+ | |||
+ | To find out more about the admin file and it's possible variables and values, look at '''man -s 4 admin''' |
Latest revision as of 00:10, 1 March 2011
So you've installed a bunch of packages that you no longer want and you want to remove them all without having to type yes to everything. 'pkgrm' by default uses an admin file to tell it how to respond to different situations during install and removal of a package. This file is /var/sadm/install/admin/default. You can use a copy of this file to alter the behaviour of 'pkgrm' so that it doesn't ask you about every package you want to remove. To do this, you need to do the following:
1. Copy /var/sadm/install/admin/default to your local directory
cp /var/sadm/install/admin/default .
2. Edit your new copy of the default file and change
action=ask
to
action=nocheck
3. When you perform the package removal operation, give 'pkgrm' the following parameters:
pkgrm -n -a /path_to_edited_default_file/default pkgname1 pkgname2 pkgname3.....
where
-n means non-interactive -a file_name means use an alternate admin file.
It should now remove all the packages you specify without annoying you for interaction :-)
To find out more about the admin file and it's possible variables and values, look at man -s 4 admin