Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I override a file installed by a package, so that a different version can be used instead?

0
Posted

How do I override a file installed by a package, so that a different version can be used instead?

0

Suppose a sysadmin or local user wishes to use a program “login-local” rather than the program “login” provided by the Debian login package. Do not: • Overwrite /bin/login with login-local. The package management system will not know about this change, and will simply overwrite your custom /bin/login whenever login (or any package that provides /bin/login) is installed or updated. Rather, do • Execute: dpkg-divert –divert /bin/login.debian /bin/login in order to cause all future installations of the Debian login package to write the file /bin/login to /bin/login.debian instead. • Then execute: cp login-local /bin/login to move your own locally-built program into place. Run dpkg-divert –list to see which diversions are currently active on your system. Details are given in the manual page dpkg-divert(8).

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123