0

for example, by use apt install xxx I installed some deb package on my ubuntu xenial system.

grub2-common                       2.02~beta2-9ubuntu1.14

How do I modify this version so that dpkg -s xxx( or just any command output from dpkg utility) will return my customized version number?

here would be an example of modification result from output of dpkg -l | grep grub2-common

grub2-common                       2.02~unicorn<3-9ubuntu1.999
  • Do you mean changing the version number without actual reinstalling? Why do you need this?! – Melebius Mar 20 '19 at 7:32
  • dpkg -l | grep xxx will show details of installed package, apt-cache policy xxx too - is that what you mean/need ? – cmak.fr Mar 20 '19 at 7:36
  • @Melebius the use case is pretty niche here, I want to stop specific package to be automatically updated by some sysadmin scripts. – Sajuuk Mar 20 '19 at 7:38
  • 1
    In this case, holding the package should be preferred. – Melebius Mar 20 '19 at 7:40
  • 2
    I’m afraid you are trying to solve an XY problem. Please add details about your “sysadmin scripts”. Perhaps they are not designed well and should be fixed instead of breaking the package system even more… – Melebius Mar 20 '19 at 7:51
1

I managed to discover that by modify status file under /var/lib/dpkg directory (requires root permission), one would be able to get modified package version which reflect in dpkg utility output.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.