≡ Menu

Solaris: Remove / uninstall the software / package

You need to use pkgrm command which will remove a previously installed or partially installed package from the system. A check is made to determine if any other packages depend on the one being removed. If a dependency exists, the action taken is defined in the admin file.

The default state for the command is in interactive mode, meaning that prompt messages are given during processing to allow the administrator to confirm the actions being taken. Non-interactive mode can be requested with the -n option.

pkgrm command syntax

Use the following command syntax
pkgrm packagename
The following example removes SUNWgtar (GNU Tar):
pkgrm SUNWgtar

The following example removes all instances of SUNWjunk:
# pkgrm -R /export/root/client1 SUNWjunk*

Where,

  • -R root_path : Defines the full path name of a directory to use as the root_path . All files, including package system information files, are relocated to a directory tree starting in the specified root_path .

See the pkgrm(1M) man page for information and options:
man 1 pkgrm

Tweet itFacebook itGoogle+ itPDF itFound an error/typo on this page?

Comments on this entry are closed.

  • ppa108 March 16, 2009, 9:57 am

    I have a problem. I download and install the packages like expat,libgcc etc. which are in sparc version and installed in intel solaris 10 server with gunzip and pkgadd -d command.
    When I tried to remove, i don’t know where to find the path.
    Help me.
    Thanks very much in advance.

  • saurabh ahuja July 5, 2011, 9:10 am

    I am getting this error while removing package even when was root:
    “Do you want to remove this package? [y,n,?,q] y
    pkgrm: ERROR: unable to change current working directory to ” then I went to location /var/sadm/pkg/SUNWgnu-emacs-x and it doesn’t had install folder. Now how can i remove my unwanted package?

  • saurabh ahuja July 5, 2011, 4:05 pm

    well I have emacs installed on solaris and I tried to uninstall this as well but it didn’t worked any idea?

    “oracle@solaris:~# pkg uninstall SUNWgnu-emacs-x
    Creating Planpkg: ‘SUNWgnu-emacs-x’ matches no installed packages

    oracle@solaris:~#””