# Look ports and packages up



## IPTRACE (Jul 3, 2017)

Is it possble to find out which apps were installed by ports or packages?
I list installed apps using `pkg info` but I don't know which were installed by ports.
During upgrading `pkg upgrade` I can upgrade application installed before by ports as well. But there is a problem with additional dependencies. Using ports I manage these options, with packages I overwirte and install app with predefined dependencies other than expected.


----------



## SirDice (Jul 3, 2017)

IPTRACE said:


> Is it possble to find out which apps were installed by ports or packages?
> I list installed apps using  pkg info but I don't know which were installed by ports.


In essence there's no difference. Ports build packages and it's this package that gets installed. So in the end they're all packages.

I highly recommend not mixing ports and packages and use ports-mgmt/poudriere or ports-mgmt/synth to build your own repository. That way you can just blindly do a pkg-upgrade(8) without having to worry about it.


----------



## IPTRACE (Jul 3, 2017)

Ok. I used as below but I still do not know to whom repository app belongs.

```
user@www:~ % pkg which /usr/local/etc/rc.d/nginx
/usr/local/etc/rc.d/nginx was installed by package nginx-1.12.0_1,2
```
nginx has been installed via ports.


----------



## SirDice (Jul 3, 2017)

My first response was the wrong thing. I simply misunderstood what you were asking. Useful tool nonetheless but not what you're looking for.


----------



## IPTRACE (Jul 3, 2017)

getopt said:


> Try `pkg info nginx | grep repository`


Do you mean if nothing comes up the app is from ports, don't you?


----------



## IPTRACE (Jul 3, 2017)

getopt said:


> Yes.


Ok, but another issue. I've installed app manually. I mean that I downloaded package, unpacked, copied files and then registered in pkg repository.
There is no repository line as well.


----------



## IPTRACE (Jul 3, 2017)

getopt said:


> Only those repositories are shown that are defined in /usr/local/etc/pkg/repos.


I don't have such file.


----------



## ShelLuser (Jul 4, 2017)

Look into /etc/pkg instead. You most likely have a file called FreeBSD.conf in there.


----------

