Thinking that the /etc/skel/.profile
was modified, I tried to find which package provides this file:
$ dpkg -S /etc/skel/.profile
bash: /etc/skel/.profile
$ apt-file list bash | head
bash: /bin/bash
bash: /bin/rbash
bash: /etc/bash.bashrc
bash: /etc/skel/.bash_logout
bash: /etc/skel/.bashrc
bash: /etc/skel/.profile
bash: /usr/bin/bashbug
bash: /usr/bin/clear_console
bash: /usr/share/debianutils/shells.d/bash
bash: /usr/share/doc/bash/COMPAT.gz
So, I moved that file and tried:
$ sudo apt --reinstall install bash
However, the file /etc/skel/.profile
was not recreated.
- Why is this so? I was thinking that if some files (of a package) are deleted or corrupted, I can easily restore them by using the
--reinstall
option. - How can I bring back a missing file from a package that it provides?
Obviously, $ sudo apt purge bash ; sudo apt install bash
is not an option in this very specific case!