Uninstalling Packages

The process of uninstalling packages is the same as installing packages. To uninstall a package, you have to make sure the package is available and already installed. Refer to Install Packages

If the package is available and installed, you can run bmake deinstall in the package source directory.

For example, to uninstall nano, find the source directory of it, and the run:

$ bmake deinstall
===> Deinstalling for nano-7.2
Running /fs1/project/hpcteam/tahat/stacks/pkgsrc/2024A/prefix/sbin/pkg_delete -K /fs1/project/hpcteam/tahat/stacks/pkgsrc/2024A/prefix/pkgdb  nano-7.2

Uninstall Packages in SStack

You may need to uninstall a package, and this can be accomplished using pkg-uninstall binary. It finds the source directory of the package, then it uses the Makefile file located there to uninstall the package.

The syntax looks like the following:

pkg-uninstall <package-name>

For example, to uninstall nano which was installed in pkg-install example, run:

 pkg-uninstall nano

To check if the package uninstalled, run:

pkg-search nano.*

The following output shows that the package doesn’t appear in Installed Packages.

Available Packages
nano
nanomsgxx
nanomsg
nanotodon
nanoblogger-extra
nanoblogger
nanosaur2
nanosaur