# portupgrade



## Bunyan (Jul 30, 2009)

```
pkg_version -L =
# This command lists outdated packages
portupgrade OUTDATED_PACKAGE
# Create new package and backup the old one.
```

Question: Where is the old package stored?


----------



## ale (Jul 30, 2009)

The old packages are installed.
Their files are in the various part of the filesystem.

When you run portupgrade a package (tbz) with the currently installed files from the version you are upgrading is created and the deleted in case of successful upgrade.


----------



## SirDice (Jul 30, 2009)

It will be stored in the directory set by $PKGDIR or /usr/ports/packages. If neither exist it will be stored in the port's directory.


----------



## ale (Jul 30, 2009)

SirDice said:
			
		

> It will be stored in the directory set by $PKGDIR or /usr/ports/packages. If neither exist it will be stored in the port's directory.


This is true if you are building your own packages from ports.


----------



## Bunyan (Jul 30, 2009)

I didn't find any package in the port's directory.
I don't want to have my filesystem trashed with unneedded packages or files.


> It will be stored in the directory set by $PKGDIR


Where can I see/change this variable?
I don't have any packages directory in /usr/ports.


----------



## ale (Jul 30, 2009)

Did you read my post (#2)?


----------



## SirDice (Jul 30, 2009)

Check what ale said. As for $PKGDIR, it isn't set by default. If it's not set the pkg_tools will use /usr/ports/packages.


----------



## Bunyan (Jul 30, 2009)

ale said:
			
		

> Did you read my post (#2)?


Yes, man I read your post.
I think since I have no packages directory in /usr/ports, I oughtn't mind about unneeded files stored somewhere in my filesystem.
Thank you.


----------

