# pkg - promote Automatic package to Manual



## Dan1973 (Sep 24, 2014)

Hi all

Anyone knows how to accomplish the following tasks with pkg()  ?

1. Promote an automatic package to manual so it will not be subject to orphaned status anymore ?
2. Demote a manually installed package to automatic so it becomes orphaned  when all references are gone ?
2. List only automatic or manually installed packages ?

Thanks


----------



## SirDice (Sep 24, 2014)

The answer is in the pkg(8) man page:

```
List non-automatic packages:
           $ pkg query -e '%a = 0' %o

     List automatic packages:
           $ pkg query -e '%a = 1' %o
```
And

```
Change a package from automatic to non-automatic, which will prevent
     autoremove from removing it:
           % pkg set -A 0 perl-5.14

     Change a package from non-automatic to automatic, which will make
     autoremove allow it be removed once nothing depends on it:
           % pkg set -A 1 perl-5.14
```


----------



## Dan1973 (Sep 24, 2014)

Thank you for your answer! The thanks are private because I don't want to pollute the forums.

Dan


----------

