1

I've copied a dpkg-status file backup from /var/backups to /var/lib/dpkg/status, but I would like to restore the status file to what it was before the copy. Will status-old in /var/lib/dpkg/status contain a copy of the status file before it was overwritten?

1 Answer 1

1

Compare the date when you modified /var/lib/dpkg/status, to the modification date of /var/lib/dpkg/status-old, by running the command ls -lt /var/lib/dpkg/ | grep status-old this will show you when /var/lib/dpkg/status-old was modified last.

Just wanted to add this really nice answer in context to this question:Why you should not mess with /var/lib/ files.

4
  • it shows the same time as the status file. Does this mean the status file was backed-up to status-old before being overwritten? Or is status-old now the same as the status file?
    – rigger12
    Aug 15, 2017 at 21:20
  • Seems like it, don't you have the backup of the status file that worked in /var/backups/? Aug 15, 2017 at 21:24
  • Thanks. Yes I saw some tips from that answer. I compared the backup with the true status file and there were differences. The status file and status old match after copying status-old to status. I am worried the differences were just recent packages I installed today meaning status-old was not a back-up. I will look more into it.
    – rigger12
    Aug 15, 2017 at 21:51
  • @rigger12 did you determine what the difference between status and status-old were?
    – Lucas
    Mar 27, 2018 at 16:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .