2

How can I backup a locally-installed apt package?

I'm troubleshooting a NVIDIA driver issue and I would like to try removing package oem-fix-gfx-nvidia-ondemandmode. I want to backup the package before I remove it, in case something really breaks. This package was installed by the laptop manufacturer (pre-installed Ubuntu) and I have no idea what it does, other than the fact that it's messing with my NVIDIA drivers. Nothing comes up by googling the package name.

Most options for "backing up apt packages" involve simply making lists of packages to download, which obviously is not going to work out for a locally-installed package. I also tried apt-clone, but that wasn't able to create a copy of this package either.

$ apt-cache policy oem-fix-gfx-nvidia-ondemandmode
oem-fix-gfx-nvidia-ondemandmode:
  Installed: 1.4
  Candidate: 1.4
  Version table:
 *** 1.4 100
        100 /var/lib/dpkg/status
$ dpkg -L oem-fix-gfx-nvidia-ondemandmode
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/oem-fix-gfx-nvidia-ondemandmode
/usr/share/doc/oem-fix-gfx-nvidia-ondemandmode/changelog.gz
/usr/share/doc/oem-fix-gfx-nvidia-ondemandmode/copyright
4
  • 1
    Are you saying that you do not have the original .deb package?
    – user535733
    Sep 1, 2021 at 12:47
  • The package was preinstalled on this laptop. I don't know if a corresponding .deb package exists somewhere or not. Sep 1, 2021 at 12:55
  • 1
    Please add output of apt-cache policy oem-fix-gfx-nvidia-ondemandmode to the question by editing it.
    – N0rbert
    Sep 1, 2021 at 12:57
  • Please run dpkg -L oem-fix-gfx-nvidia-ondemandmode and find /var/lib/dpkg/ -name "oem-fix-gfx-nvidia-ondemandmode.*" and add their output to the question. I'm not sure is it same package or not, but there is some PPA with version 1.5.
    – N0rbert
    Sep 1, 2021 at 17:44

2 Answers 2

2

Option 1: Contact your OEM support. They provided the software. Since Ubuntu did not provide the package, the Ubuntu repositories do NOT have a copy of it.

Option 2: Use the command dpkg -L oem-fix-gfx-nvidia-ondemandmode to show you a list of all the files included in that package. You can manually back up and restore those files, though not in the form of a package; this is a somewhat kludgy workaround. Warning: If you make a mistake or a file gets corrupted during copy, apt cannot magically recover since it lacks a .deb to work from.

0

If I understand things correctly, then this package came from OEM packagers, like this PPA.

The oem-fix-gfx-nvidia-ondemandmode_1.5 package itself is almost empty, as it has only 2 objects:

/usr/share/doc/oem-fix-gfx-nvidia-ondemandmode/changelog.gz
/usr/share/doc/oem-fix-gfx-nvidia-ondemandmode/copyright

But the most interesting part of package is its post-install script.

You have to find it at /var/lib/dpkg/info/oem-fix-gfx-nvidia-ondemandmode.postinst and backup.

You must log in to answer this question.

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