apt reinstall package broken?

Blake Barnett shadoi at nanovoid.com
Thu Aug 3 17:07:23 MDT 2006


On Aug 3, 2006, at 2:55 PM, Roberto Mello wrote:

> 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)
<snip>

Even these are overkill, unless configured otherwise APT defaults to  
caching all packages that are installed in /var/cache/apt/archive,  
besides, if you download the package you are very likely to get a  
newer version than what you're running and this could lead to  
unexpected behavior.

Use dpkg to extract specific files from the exact version you need  
in /var/cache/apt/archives.

-Blake




More information about the PLUG mailing list