-
# Installing Applications using NetBSD's pkgsrc framework
[[!toc levels=3]]
**Note:** Once you have updated your pkgsrc collection, before attempting a package upgrade, you should check the `/usr/pkgsrc/UPDATING` file. This file describes various issues and additional steps users may encounter and need to perform when updating a port.
+There are multiple ways to upgrade your installed packages.
+ **Traditional way:**
Keeping your packages up to date can be a tedious job. For instance, to upgrade a package you would go to the package directory, build the package, deinstall the old package , install the new package, and then clean up after the build. Imagine doing that for five packages, tedious right? This was a large problem for system administrators to deal with, and now we have utilities which do this for us. For instance the `pkg_chk` utility will do everything for you!
-
+ **Using `pkg_chk` utility:**
pkg_chk requires a few steps in order to work correctly. They are listed here.
# pkg_chk -a # install all missing packages (use binary packages, this is the default
# pkg_chk -as # install all missing packages (build from source)
-The above process removes all packages at once and installs the missing packages one by one.This can cause longer disruption of services when the removed package has to wait a long time for its turn to get installed. "pkg_rolling-replace" replaces packages one by one and one can use it for a better way of package management. You can install "pkg_rolling-replace" by the following procedure.
+The above process removes all packages at once and installs the missing packages one by one.This can cause longer disruption of services when the removed package has to wait a long time for its turn to get installed.
+
+ **Using `pkg_rolling-replace` utility:**
+
+"pkg_rolling-replace" replaces packages one by one and one can use it for a better way of package management. You can install "pkg_rolling-replace" by the following procedure.
# cd /usr/pkgsrc/pkgtools/pkg_rolling-replace/
# bmake install
# pkg_rolling-replace -u
If some package like "bmake" does not get updated and throws an error during the above steps you can update it manually.
-Inside the packages directory (devel/bmake in this case)
+Inside the packages directory (/usr/pkgsrc/devel/bmake in this case)
# env USE_DESTDIR=full bmake package
# bmake clean-depends clean
# pkg_add -u <pkg_name> (i.e. the name of the .tgz file).
-Also you can use "pkgin" to update software using binary packages just like apt or yum.
+ **Using `pkgin` utility:**
+
+You can also use "pkgin" to update software using binary packages just like apt or yum.
# cd /usr/pkgsrc/pkgtools/pkgin/
# bmake install