# Ports dependencies



## circus78 (Mar 15, 2016)

Hi,

I just installed editors/vim, while my goal was to install editors/vim-lite.

How can I find and eliminate all ports installed by editors/vim?

I am using FreeBSD 10.2-RELEASE-p9
Thank you


----------



## kpa (Mar 15, 2016)

You can run `# pkg autoremove` after you have uninstalled editors/vim, this will remove all automatically installed dependencies that are no longer required by other installed packages.


----------



## Maxnix (Mar 15, 2016)

Use `pkg autoremove`. This let you remove all dependecies installed by a removed port/package


----------



## circus78 (Mar 15, 2016)

Hi,
this way, I'll get every port that is no longer needed by other ports.. not only needed by editors/vim, right?
Is there a way to retrieve only ports needed by editors/vim?

Thank you!


----------



## SirDice (Mar 15, 2016)

Keep in mind that some dependencies of editors/vim may be needed by other ports too. Simply removing all vim's dependencies can and will break others. A pkg-autoremove(8) will automatically do the right thing.


----------



## wblock@ (Mar 15, 2016)

Well... it will remove all packages that were automatically installed (as dependencies) that are no longer depended on by any other packages.  This is not always the right thing.  For example, someone might have written their own Perl programs that need a module which `pkg autoremove` has removed.

pkg-info(8) has options to show which packages are required by (depended on) a package and which packages a package depends on.

```
% pkg info -r vim-7.4.1556
%
```
There aren't any packages in my system that depend on vim.  So what packages does vim depend on?

```
% pkg info -d vim-7.4.1556
vim-7.4.1556:
   libXpm-3.5.11_4
   libXt-1.1.5,1
   python27-2.7.11_1
   gtk2-2.24.29_1
   pango-1.38.0
   perl5-5.20.3_8
   atk-2.18.0
   ruby-2.1.8,1
   glib-2.46.2
%
```


----------



## gnath (Dec 7, 2017)

Hi,
Sorry for using this old thread. I got many queries answered and help. But Google put me here for how to find any information for un-installed ports like depend, reverse depend, download size for own & total etc.
I am new to freebsd world from debian devuan. I like this base & port system much.

Regards,


----------



## tobik@ (Dec 7, 2017)

gnath said:


> Hi,
> Sorry for using this old thread. I got many queries answered and help. But Google put me here for how to find any information for un-installed ports like depend, reverse depend, download size for own & total etc.
> I am new to freebsd world from debian devuan. I like this base & port system much.
> 
> Regards,


You can use pkg-rquery(8) to look up information about uninstalled packages.


----------



## gnath (Dec 7, 2017)

Thank you tobik@ for such quick reply. But have to explore more.

Thanks


----------



## gnath (Dec 7, 2017)

For that require "pkg update" now. I am using port tree system. Any harm mixing  pkg syst. 

Regards


----------



## SirDice (Dec 8, 2017)

If you use only the default settings for ports you may as well switch to packages completely. There's nothing to gain by building from ports. You should really only use the ports if you need/want to deviate from the defaults.


----------



## gnath (Dec 15, 2017)

Sorry for late here. I like port system, but as I am new I have to explore more. I would like to gather/search informations like installed size with hard dependencies, description etc of uninstalled ports before install from port system. 
Thanks,


----------

