How To Install etckeeper on Fedora 36

In this tutorial we learn how to install etckeeper in Fedora 36. etckeeper is Store /etc in a SCM system (git, mercurial, bzr or darcs)

Introduction

In this tutorial we learn how to install etckeeper on Fedora 36.

What is etckeeper

The etckeeper program is a tool to let /etc be stored in a git, mercurial, bzr or darcs repository. It hooks into yum to automatically commit changes made to /etc during package upgrades. It tracks file metadata that version control systems do not normally support, but that is important for /etc, such as the permissions of /etc/shadow. It’s quite modular and configurable, while also being simple to use if you understand the basics of working with version control. The default backend is git, if want to use a another backend please install the appropriate tool (mercurial, darcs or bzr). To use bazaar/breezy as backend, please also install the etckeeper-brz package. To start using the package please read /usr/share/doc/etckeeper/README.

We can use yum or dnf to install etckeeper on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install etckeeper.

Install etckeeper on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install etckeeper using dnf by running the following command:

sudo dnf -y install etckeeper

Install etckeeper on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install etckeeper using yum by running the following command:

sudo yum -y install etckeeper

How To Uninstall etckeeper on Fedora 36

To uninstall only the etckeeper package we can use the following command:

sudo dnf remove etckeeper

etckeeper Package Contents on Fedora 36

/etc/cron.daily/etckeeper
/etc/etckeeper
/etc/etckeeper/commit.d
/etc/etckeeper/commit.d/10vcs-test
/etc/etckeeper/commit.d/20store-metadata
/etc/etckeeper/commit.d/30bzr-add
/etc/etckeeper/commit.d/30darcs-add
/etc/etckeeper/commit.d/30git-add
/etc/etckeeper/commit.d/30hg-addremove
/etc/etckeeper/commit.d/50vcs-commit
/etc/etckeeper/commit.d/99push
/etc/etckeeper/commit.d/README
/etc/etckeeper/daily
/etc/etckeeper/etckeeper.conf
/etc/etckeeper/init.d
/etc/etckeeper/init.d/10restore-metadata
/etc/etckeeper/init.d/20restore-etckeeper
/etc/etckeeper/init.d/40vcs-init
/etc/etckeeper/init.d/50vcs-ignore
/etc/etckeeper/init.d/50vcs-perm
/etc/etckeeper/init.d/50vcs-pre-commit-hook
/etc/etckeeper/init.d/60darcs-deleted-symlinks
/etc/etckeeper/init.d/70vcs-add
/etc/etckeeper/init.d/README
/etc/etckeeper/list-installed.d
/etc/etckeeper/list-installed.d/50list-installed
/etc/etckeeper/post-install.d
/etc/etckeeper/post-install.d/50vcs-commit
/etc/etckeeper/post-install.d/README
/etc/etckeeper/pre-commit.d
/etc/etckeeper/pre-commit.d/20warn-problem-files
/etc/etckeeper/pre-commit.d/30store-metadata
/etc/etckeeper/pre-commit.d/README
/etc/etckeeper/pre-install.d
/etc/etckeeper/pre-install.d/10packagelist
/etc/etckeeper/pre-install.d/50uncommitted-changes
/etc/etckeeper/pre-install.d/README
/etc/etckeeper/unclean.d
/etc/etckeeper/unclean.d/50test
/etc/etckeeper/unclean.d/README
/etc/etckeeper/uninit.d
/etc/etckeeper/uninit.d/01prompt
/etc/etckeeper/uninit.d/50remove-metadata
/etc/etckeeper/uninit.d/50vcs-uninit
/etc/etckeeper/uninit.d/README
/etc/etckeeper/update-ignore.d
/etc/etckeeper/update-ignore.d/01update-ignore
/etc/etckeeper/update-ignore.d/README
/etc/etckeeper/vcs.d
/etc/etckeeper/vcs.d/50vcs-cmd
/usr/bin/etckeeper
/usr/lib/systemd/system/etckeeper.service
/usr/lib/systemd/system/etckeeper.timer
/usr/share/bash-completion
/usr/share/bash-completion/completions
/usr/share/bash-completion/completions/etckeeper
/usr/share/doc/etckeeper
/usr/share/doc/etckeeper/README.fedora
/usr/share/doc/etckeeper/README.html
/usr/share/licenses/etckeeper
/usr/share/licenses/etckeeper/GPL
/usr/share/man/man8/etckeeper.8.gz
/usr/share/zsh
/usr/share/zsh/vendor-completions
/usr/share/zsh/vendor-completions/_etckeeper
/var/cache/etckeeper

References

Summary

In this tutorial we learn how to install etckeeper on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).