Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Aug 2022 06:23:47 +0900
From:      Tatsuki Makino <tatsuki_makino@hotmail.com>
To:        Kevin Oberman <rkoberman@gmail.com>, FreeBSD Ports ML <freebsd-ports@freebsd.org>
Subject:   Re: Recover from a corrupt pkg DB
Message-ID:  <PSAPR03MB5639F05D0485A0C3EC098EE8FA799@PSAPR03MB5639.apcprd03.prod.outlook.com>
In-Reply-To: <PSAPR03MB56398D79D1B8F6288772DD7FFA799@PSAPR03MB5639.apcprd03.prod.outlook.com>
References:  <CAN6yY1vGf=LdXQ4DZjJRxho2t%2BNcGd0jt2-T7nhm84YjtCKN5g@mail.gmail.com> <PSAPR03MB56398D79D1B8F6288772DD7FFA799@PSAPR03MB5639.apcprd03.prod.outlook.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Addition.
Ports that need to be reinstalled can usually be found in pkg check -sna.

Tatsuki Makino wrote on 2022/08/31 06:19:
> Hello.
> 
> I also just recently unlinked /var/db/pkg/local.sqlite to a place where it cannot be traced from the /var file system :)
> To recover from that, there should already be a backup that others have mentioned, in which case the following command is all that is needed to restore it.
> 
> xzcat /var/backups/pkg.sql.xz | pkg shell
> 
> Now all that is left is to re-install the port that was installed after that backup was made, and you will most likely be back to normal.
> After the backup is made, if the port tree is updated and there are any plist changes, no :)
> 
> Regards.
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?PSAPR03MB5639F05D0485A0C3EC098EE8FA799>