# [pkg] downgrade packages from private repo



## zirias@ (Dec 17, 2022)

Because of PR 268327, I reverted some commits locally so I have older versions of the mesa-* packages in my repository again.

Now, on my desktop, I can downgrade them with `pkg install -f`. But then, I need to know _which_ packages to downgrade. I just tested, even `pkg upgrade -f` does not consider downgrades...

Looking for an elegant way to at least know which packages to downgrade, better yet just carry out the operation. Any ideas?


----------



## zirias@ (Dec 17, 2022)

Ok, I found a way to do it, although it doesn't seem very elegant:
`pkg version -l\> | grep '>$' | sed -e 's:-[^-]*>::' | xargs pkg install -yf`

Any _better_ ideas?


----------

