Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Debian GNU/Linux FAQ
Prev Home Next

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

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.

Details are given in the manual page dpkg-divert(8).

Debian GNU/Linux FAQ
Prev Home Next

  Published under the terms of the GNU General Public License Design by Interspire