packages

package
v3.0.0-beta10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lister

type Lister func() (Pkgs, error)

type Pkg

type Pkg struct {
	Name        string    `json:"name"`
	Version     string    `json:"version"`
	Arch        string    `json:"arch"`
	Type        string    `json:"type"`
	InstalledAt time.Time `json:"installed_at"`
	Sig         string    `json:"sig"`
}

type Pkgs

type Pkgs []Pkg

func List

func List() (Pkgs, error)

List returns the list of installed packages of all known types (deb, rpm, snap, ...).

func ListDeb

func ListDeb() (Pkgs, error)

ListDeb returns the list of installed deb packages.

func ListFreeBSDPkgInfo

func ListFreeBSDPkgInfo() (Pkgs, error)

ListFreeBSDPkgInfo returns the list of installed pkg_info packages (FreeBSD).

func ListFreeBSDPkgQuery

func ListFreeBSDPkgQuery() (Pkgs, error)

ListFreeBSDPkgQuery returns the list of installed packages (FreeBSD).

func ListIPS

func ListIPS() (Pkgs, error)

ListIPS returns the list of installed ips packages (solaris). Example output:

x11/library/libsm                                 1.2.2-11.4.0.0.1.14.0      i--

func ListLPP

func ListLPP() (Pkgs, error)

ListLPP returns the list of installed lpp packages (aix).

func ListPkginfo

func ListPkginfo() (Pkgs, error)

ListPkginfo returns the list of installed pkginfo packages (solaris). Example output:

 PKGINST:  SUNWzoneu
    NAME:  Solaris Zones (Usr)
CATEGORY:  system
    ARCH:  i386
 VERSION:  11.11,REV=2009.04.08.17.26
  VENDOR:  Sun Microsystems, Inc.
    DESC:  Solaris Zones Configuration and Administration
 HOTLINE:  Please contact your local service provider
  STATUS:  completely installed

func ListPkgutil

func ListPkgutil() (Pkgs, error)

ListPkgutil returns the list of packages installed with pkgutil (darwin). Example output:

$ pkgutil --packages
com.apple.pkg.HP_Scan
com.apple.pkg.HP_Scan3
...

Example output:

$ pkgutil --pkg-info com.apple.pkg.X11User
package-id: com.apple.pkg.X11User
version: 10.6.0.1.1.1238328574
volume: /
location: /
install-time: 1285389505
groups: com.apple.snowleopard-repair-permissions.pkg-group com.apple.FindSystemFiles.pkg-group

func ListRpm

func ListRpm() (Pkgs, error)

ListRpm returns the list of installed rpm packages.

func ListSnap

func ListSnap() (Pkgs, error)

ListSnap returns the list of installed snap packages. Example command output:

Name      Version    Rev   Tracking  Publisher   Notes
core      16-2.35.4  5662  stable    canonical*  core
inkscape  0.92.3     4274  stable    inkscape*   -
skype     8.32.0.44  60    stable    skype*      classic

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL