# portsclean -D, doesn't remove obsolete distfiles



## Seeker (Sep 5, 2010)

```
# portsclean -D
Detecting unreferenced distfiles...
no unreferenced distfiles found.
```


```
# ll /usr/ports/distfiles/Mesa*
-rw-r--r--  1 root  wheel  nodump  321K Aug 18 20:16:01 2010 /usr/ports/distfiles/MesaGLUT-7.4.4.tar.bz2
-rw-r--r--  1 root  wheel  nodump  3.2M Aug 18 20:16:03 2010 /usr/ports/distfiles/MesaLib-7.4.4.tar.bz2
-rw-r--r--  1 root  wheel  -       4.9M Jun 17 20:19:00 2010 /usr/ports/distfiles/MesaLib-7.8.2.tar.bz2
```
As I know, *MesaLib-7.4.4.tar.bz2*, should be gone for good, but nada!

I tried:

```
# rm /var/db/pkg/pkgdb.db /usr/ports/INDEX-*.db

... Then rebuild of both those here ...

# portsclean -D
Detecting unreferenced distfiles...
no unreferenced distfiles found.
```

What a??


----------



## G4 (Sep 5, 2010)

Try portsclean -DD.


----------



## Seeker (Sep 5, 2010)

G4 said:
			
		

> Try portsclean -DD.


I'm not gona do it, as there are up to date distfiles, which are just not installed and would be erased by this command.


----------



## wblock@ (Sep 5, 2010)

Look up the WITHOUT_NOUVEAU switch.


----------



## Seeker (Sep 5, 2010)

I added it to make.conf
Distfile is still here..., but then again, taking into account existance of WITHOUT_NOUVEAU, then this is not an error, at all.


----------



## valuequest (Mar 13, 2011)

Just out of curiosity what references to the .gz and .bz2 files make it necessary to keep them in /usr/ports/distfiles _after_ the packages are installed?


----------



## wblock@ (Mar 13, 2011)

It's not necessary to keep distfiles, just nice to have them there if you have to rebuild the port.  The disk space used can be reclaimed by deleting /usr/ports/distfiles at any time, so it's not a big commitment.


----------

