Am I really lost if I've just deleted /var/db/pkg/* by mistake?

I know it's my fault, but now everything works, I can start programs etc, only thing that is not ok is updating.
Do I have to download and install everything again eventhough it works?
I'm a newbie and dont know exactly what i have done, but for example in /var/db/ports there are similar directories as there were in /var/db/pkg ... or cant this directory be restored/rebuilt with some program/script? Please help me, it took so much time to build all those programs..

(..and im sorry for my english of course..)
 
No, you are not lost but you cannot upgrade or delete software.

toomadd said:
... Do I have to download and install everything again eventhough it works? ...

Yes if you want to "regenerate" the content of /var/db/pkg

toomadd said:
... (..and im sorry for my english of course..)

I'm sorry too for my english :)
 
depending upon the method used to install, there may be
/work/ folders which can aid in a scripted reinstall.
...........
btw I always, every few weeks, " cp -vRp /var/db " somewhere
..........
If you look at the accidental deletion as a "customization"
then while some ports upgrades may need workarounds, it
will gradually go away (This is conjecture on my part). The
only problem is you want a list of the ports you have installed
somewhere probably ?
 
Backup lots of stuff, lots of the time

I've done this and it's a major pain. You can suck a bunch of it back in by rebuilding some of your high-level ports (firefox, mplayer, openoffice) but some ports seem(ed?) to check for the actual libraries/executables rather than an entry in /var/db/pkg, so plenty may get skipped.

Another problem is missed things not being properly deinstalled and stale libraries/executables hanging around messing up dependancies.

Probably the simplest (albeit the least satisfying) is to just chuck your /usr/local and start over.

And archive /var/db/pkg frequently.
 
Back
Top