Reinstalling with dependencies

Grzegorz Junka list1 at gjunka.com
Wed May 22 12:55:00 UTC 2019


On 22/05/2019 13:48, Grzegorz Junka wrote:
>
> On 22/05/2019 13:42, Miroslav Lachman wrote:
>> Grzegorz Junka wrote on 2019/05/22 14:11:
>>
>> [...]
>>
>>> Are you saying that even if elinks was reinstalled with dependencies 
>>> that wouldn't help?
>>>
>>> We have two issues here:
>>>
>>> 1. How to reinstall a package with dependencies (as stated in the 
>>> subject)
>>
>> You can try something like this
>>
>> pkg install -f `pkg info -d elinks | tr -d :`
>>
>>
>> pkg info -d will list direct dependencies of the port and then this 
>> list is given to command pkg install -f.
>>
>
> That's a good idea. Thank you. I may probably want to strip versions 
> too, to allow upgrading to more recent versions. But I can take it 
> from there.
>

However, I just realized that it may not be enough, i.e. pkg info -d 
lists only direct dependencies, so this would allow me to reinstall all 
direct dependencies but not recursively.

Adding a loop in bash or something is another solution but it starts to 
become clunky.




More information about the freebsd-ports mailing list