# pkg want to remove dialog4ports?



## Deleted member 66267 (Feb 3, 2021)

The only thing I installed from ports is drm-kmod, even though I'm going to build more from ports.

I also used pkg to install/remove prebuilt packages and to keep my system clean I used pkg autoremove regularly.

How to prevent pkg from asking to remove dialog4ports everytime I issue pkg autoremove? Thanks.


----------



## SirDice (Feb 3, 2021)

also-ran said:


> How to prevent pkg from asking to remove dialog4ports everytime I issue pkg autoremove?


`pkg set -A0 dialog4ports` See pkg-set(8). It was probably once installed as a dependency so it was registered as 'automatic'. If you removed that other port/package and nothing else depends on it anymore it will get removed by pkg-autoremove(8).


----------



## Deleted member 66267 (Feb 3, 2021)

SirDice said:


> `pkg set -A0 dialog4ports` See pkg-set(8). It was probably once installed as a dependency so it was registered as 'automatic'. If you removed that other port/package and nothing else depends on it anymore it will get removed by pkg-autoremove(8).


Meanwhile I come up with my own solution:

`pkg lock dialog4ports`

Please let me know comparing to your solution which one is more right. Thanks.


----------



## SirDice (Feb 3, 2021)

A pkg-lock(8) will prevent it from being updated too, and anything that depends on it will also be prevented from updates. Usually not what you want to happen. Just set the flag to non-automatic, that will stop pkg-autoremove(8) from trying to remove it.


----------

