# portupgrade doesn't work, why?



## cola (Dec 2, 2010)

`portupgrade -PP <packagename>`

```
su: portupgrade: command not found
```
But man portupgrade displays the man page.


----------



## SirDice (Dec 2, 2010)

Did you just install it? And you have (t)csh as a shell?

Then you need to run the *rehash* command for the shell to pick up the new executable.


----------



## DutchDaemon (Dec 2, 2010)

cola, *again*: post questions in the correct forum, please! Moved.


----------



## jrm@ (Dec 2, 2010)

The binaries for portupgrade are put in /usr/local/sbin/, which might not be in your $PATH.
Does /usr/local/sbin/portupgrade work?


----------



## cola (Dec 5, 2010)

SirDice said:
			
		

> Did you just install it? And you have (t)csh as a shell?
> 
> Then you need to run the *rehash* command for the shell to pick up the new executable.


It's bash.


----------



## DutchDaemon (Dec 5, 2010)

In bash it's [cmd=]hash -r[/cmd]


----------



## cola (Dec 6, 2010)

DutchDaemon said:
			
		

> In bash it's [cmd=]hash -r[/cmd]


I did hash -r still problem.
whereis portupgrade:

```
portupgrade: /usr/local/man/man1/portupgrade.1.gz /usr/ports/ports-mgmt/portupgrade
```
type portupgrade

```
bash: type: portupgrade: not found
```


----------



## DutchDaemon (Dec 6, 2010)

If whereis(1) and which(1) can't find it, and it isn't in /usr/local/sbin/, it isn't installed. If it _is_ in /usr/local/sbin/, your PATH is incomplete.


----------



## jrm@ (Dec 6, 2010)

It's /usr/local/*sbin*/portupgrade.


----------



## DutchDaemon (Dec 7, 2010)

Right, forgot about that. Fixed.


----------

