Is there a way to rename an installed .deb package with dpkg?

Context: I have installed a library compiled for debug using checkinstall, now I wish to install the library compiled for release, for the release version I renamed the package mypackage-release and I would like to rename the debug package (currently know to dpkg as mypackage) to mypackage-debug.

  • The only thing worse than using checkinstall is modifying the resultant package willy nilly. – Pricey Sep 2 '11 at 21:20
  • Can you comment on why you feel this way about these things PriceChild? – dukedave Sep 15 '11 at 0:43
  • For starters, I don't see how you can work out dependencies effectively. Checkinstall 'sort of works' but I'd definitely advocate building your own debian package and doing it properly. It's a slog, but once you've done it once, updating it will be far more manageable. – Pricey Sep 15 '11 at 10:14

Just Don't Do It. And in the future, refrain from putting version and build information in the package name; you want something like mypackage_1.0~debug and mypackage_1.0 instead.

  • Can you elaborate further? Is the use of '~' a special naming convention I am unaware of? – dukedave Sep 15 '11 at 0:44
  • 1
    The version numbering of deb packages has a special feature so you can create "prerelease" packages. packagename-1.0 is always regarded as newer than packagename-1.0~anything but they are the same package. (If you need to be able to install both at the same time, then of course this doesn't make sense. Create a separate packagename-debug package in that case, perhaps only containing the debug symbols for the main package.) Normally, the sort order is such that any suffix is regarded as "newer" than a version string with no suffix. – tripleee Sep 16 '11 at 7:01
  • I don't understand. "packagename-1.0 is always regarded as newer than packagename-1.0~anything" + "any suffix is regarded as "newer" than a version string with no suffix" ? – andresp Mar 2 '16 at 12:46
  • 1
    @andresp: Any suffix except one starting with a tilde is regarded as newer, but the tilde is a special case devised precisely for this scenario. – tripleee Mar 2 '16 at 13:30

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.