b66e
![]() |
|
|
|
|
|||||||
| Installation and Maintenance of FreeBSD Ports or Packages Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software). |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
This could sound trivial, but as far as I get it the pkg_ tools use the /var/db/pkg directory to see the installed packages information. If this is true, supposing that the above directory is emptied due to an error, is there a way to rebuild it and to delete installed packages?
|
|
#2
|
|||
|
|||
|
If you meant "reinstall" to re-register the packages, some thing like
Code:
# requires /usr/ports/ports-mgmt/pkg pre-installed... on
# the problematic computer or one with the same [ or same AND additional ]
# ports installed, from which to copy the local.sqlite file.
# (see additional conditions below...)
cd /usr/local/sbin
find . -type f -exec pkg which {} \; | awk '{print $6}' | uniq | sort | uniq | tee -a /tmp/pkgs_to_reinstall_from_ports_or_portmasterPP.log
# repeat for /usr/local/bin, then check the large (firefox, etc) pkgs reinstalled.
#or,
make missing
# from the /usr/ports/www/firefox which "exist" (run) but are not registered.
One could place the pkg database file on the computer from another one if it was built on a machine where the machine to repair has a lesser subset of ports. [No time to check the above for typos'...] BTW that file local.sqlite should be backed up somewhere on every machine if one is wise, /var/db/pkg also contains it. [I had to actually use that method because /var had to be reinstalled due to part[!!] of the hard disk being unusable.] Last edited by jb_fvwm2; June 22nd, 2012 at 01:08. Reason: pkg |
|
#3
|
||||
|
||||
|
Default periodic scripts also create a backup under /var/backups
__________________
Powered by BareBSD |
|
#4
|
||||
|
||||
|
That's pkgng, which is not out for general use yet.
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] /var/db/pkg deleted | sk8harddiefast | Installation and Maintenance of FreeBSD Ports or Packages | 9 | March 20th, 2011 21:04 |
| [Solved] Port deleted | folivora | Installation and Maintenance of FreeBSD Ports or Packages | 11 | October 8th, 2010 20:35 |
| I deleted all files from /etc accidentally | sk8harddiefast | General | 20 | September 12th, 2010 20:39 |
| Electricsheep: why was deleted? | zeiz | Installation and Maintenance of FreeBSD Ports or Packages | 4 | December 15th, 2009 23:40 |
| Am I really lost if I've just deleted /var/db/pkg/* by mistake? | toomadd | Installation and Maintenance of FreeBSD Ports or Packages | 3 | March 9th, 2009 23:01 |