apt reinstall package broken?

Roberto Mello rmello at fslc.usu.edu
Thu Aug 3 15:55:14 MDT 2006

On Thu, Aug 03, 2006 at 03:28:55PM -0600, Kenneth Burgener wrote:
> I accidentally deleted the /etc/init.d/samba script.  I thought I could
> get it back by removing samba and reinstalling, but apt did not
> regenerate this file.  What am I doing wrong?
> First I did
>     # apt-get remove samba samba-common
>     # apt-get clean
>     # apt-get install samba
> But the samba script did not get recreated.  Which step am I missing?

Removing/reinstalling the package just to get one missing file is
overkill. I can think of several possibly better options:

1) apt-get -d install samba-common (download only, then use ar x
samba-common_version.deb to extract it, and copy the file)

2) apt-get --reinstall install samba-common (Re-Install packages that are
already installed and at the newest version)

3) apt-get source samba-common, then copy the file. This is a much larger
download though.

The option you were looking for is --purge (as others have mentioned).
However, that would remove all your samba configurations.


It's amazing how many people you could be friends with if only they'd
make the first approach.

More information about the PLUG mailing list