Resources Downloads Account Logout Contact
 
Resources
Package Utilities Suite
 

Removing packages (pkg-rm)

The pkg-rm tool is used to remove packages installed by pkg-inst. The pkg-rm tool makes use of the package database specified with --pkg-db=path and the global package database, "/opt/TWWfsw/pkgutils15/share/pkg-db.xml", containing a list of all pkg-inst packages every created. Only packages in the package database directory or global package database can be removed. The global package database was introduced in the 1.3 version and is being deprecated by the package database directory.

Package dependents (reverse dependencies) can be removed when a package is removed using the "--add-reverse-deps" option. The --ignoredeps option allows pkg-rm to remove a package even though the package being removed is a dependency for another package. By default, pkg-rm will not remove a package unless all dependents are listed or if the --add-reverse-deps option is given. Like the pkg-inst tool, pkg-rm, when given the --add-reverse-deps option, will remove only those components of the dependent package necessary to meet the reverse dependency. An example of this is show below when xpm is removed and only the runtime component of its dependent package, mgv, is removed, leaving the man component installed.

The package name given as input to pkg-rm is the same as that used by pkg-inst. A sample run removing the gzip package follows:

    $ pkg-rm gzip
    gzip
      checking if v1.3.5-1 installed (TWWgzp13) ... yes
        installed instances ... TWWgzp13m TWWgzp13u TWWgzp13d
      checking for packages dependent on me ... none
      checking for dependencies ... none
      removing TWWgzp13d ...
        $ pkgrm -a /opt/TWWfsw/pkgutils15/share/pkgadd/admin -n TWWgzp13d
        ...
        removing package database entry for doc fileset ... done
      removing TWWgzp13u ...
        $ pkgrm -a /opt/TWWfsw/pkgutils15/share/pkgadd/admin -n TWWgzp13u
        ...
        removing package database entry for runtime fileset ... done
      removing TWWgzp13m ...
        $ pkgrm -a /opt/TWWfsw/pkgutils15/share/pkgadd/admin -n TWWgzp13m
        ...
        removing package database entry for man fileset ... done
    

As an example of the --add-reverse-deps option, the following example removes the xpm package which automatically removes the mgv package (dependent on the xpm package):

    $ pkg-rm xpm
    xpm
      checking if v3.4k-3 installed (TWWxpm) ... yes
        installed instances ... TWWxpm.TWWxpm-RUN
      checking for packages dependent on me ... yes
        TWWmgv [mgv] ... installed (v3.1.5-2)
      checking package list ...
        mgv v3.1.5 not found in package list
      checking for dependencies ... none
      skipping due to failed reverse dependencies

    $ pkg-rm --add-reverse-deps xpm
    xpm
      checking if v3.4k-3 installed (TWWxpm) ... yes
        installed instances ... TWWxpm.TWWxpm-RUN
      checking for packages dependent on me ... yes
        TWWmgv [mgv] ... installed (v3.1.5-2)
      reordering packages ...
        adding TWWmgv [mgv] (v3.1.5) to package list
      checking for dependencies ... none
      will remove after dependent packages removed

    mgv
      checking if v3.1.5-2 installed (TWWmgv) ... yes
        installed instances ... TWWmgv.TWWmgv-RUN
      checking for packages dependent on me ... none
      checking for dependencies ... yes
        TWWxpm.TWWxpm-RUN (v>=3.4k, r>=1) ... installed (v3.4k-3)
      removing TWWmgv.TWWmgv-RUN ...
        $ swremove TWWmgv.TWWmgv-RUN
        ...
        removing package database entry for runtime fileset ... done

    xpm
      checking if v3.4k-3 installed (TWWxpm) ... yes
        installed instances ... TWWxpm.TWWxpm-RUN
      checking for packages dependent on me ... none
      checking for dependencies ... none
      removing TWWxpm.TWWxpm-RUN ...
        $ swremove TWWxpm.TWWxpm-RUN
        ...
        removing package database entry for runtime fileset ... done
    
 
Resources
Release Notes
Getting Started
Package Utilities Suite
Package Internals
Mirroring Repository
GPG Public Key
 
Package Utilities Suite
Installing packages
Removing packages
Package information
Maintaining common links
Checking for updates