# PKG how to select packages for installation?



## Sub4sub (Apr 26, 2022)

I have a list of packages to upgrade, is there any way to be able to edit the list of packages with I want to upgrade or install??


----------



## Deleted member 70435 (Apr 26, 2022)

yes of course just put in order 






						pkg
					






					www.freebsd.org


----------



## Sub4sub (Apr 26, 2022)

How to do that?


----------



## Deleted member 70435 (Apr 26, 2022)

Sub4sub said:


> How to do that?


my comrade has many ways to do this, in my case I use the portmaster, I find a real tool, very sharp, but as tradition I have mastered one of its principles


----------



## meaw229a (Apr 26, 2022)

If your list is a text file this would be an option:

Edit the file with what you want to install than

pkg install -y `cat pkglist`

pkglist is the name of the text file you have.

To create a new file list: pkg prime-list > pkglist

Hope this helps.


----------



## SirDice (Apr 26, 2022)

Sub4sub said:


> I have a list of packages to upgrade


Word of advice, don't upgrade individual packages, upgrade everything in one go; `pkg upgrade`. You will run into dependency issues if you don't.

As for installing, look at the solution meaw229a posted. You can also just add the packages you want on a single pkg-install(8), like so: `pkg install package1 package2 package3` etc.


----------

