LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 09-30-2004, 11:15 AM   #1
bobwall
Member
 
Registered: Jul 2004
Location: Milpitas, California
Distribution: 1/2 Debian 1/2 my own
Posts: 189

Rep: Reputation: 30
how dpkg removes old files


When you upgrade a package by doing dpkg -i <package file> does dpkg delete all the old files that came with the package (including the config files) instead of just overwriting them? On some occasions (don't remember really), I notice there would be empty directories or even files that should have been removed but are still there.

I know that dpkg --purge generally always gets rid of every file in a package. Is the same behavior guaranteed when upgrading with dpkg -i? I don't want my computer to suffer the same sort of bitrot that plagues most windows uninstallers.
 
Old 09-30-2004, 12:12 PM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 3,656

Rep: Reputation: 115Reputation: 115
Re: how dpkg removes old files

Quote:
Originally posted by bobwall
When you upgrade a package by doing dpkg -i <package file> does dpkg delete all the old files that came with the package (including the config files) instead of just overwriting them? On some occasions (don't remember really), I notice there would be empty directories or even files that should have been removed but are still there.

I know that dpkg --purge generally always gets rid of every file in a package. Is the same behavior guaranteed when upgrading with dpkg -i? I don't want my computer to suffer the same sort of bitrot that plagues most windows uninstallers.
Well you are never going to suffer from the same symptoms as when using windows. Most times it some stupid packaging error that leaves behind the directory or files were created post install in the directory that the package system knows nothing about so cannot remove the directory because it is not empty. When I notice it I usually rm -rf /directory/left/behind and just get rid of it as it should not be left on the machine in most cases unless you were asked a debconf question when you installed the program and said yes to leaving config files/database or somesuch on the machine when removing the package.
 
Old 09-30-2004, 12:19 PM   #3
macondo
Senior Member
 
Registered: Jul 2003
Posts: 1,017

Rep: Reputation: 52
HappyTux is correct of course.

What i do to remove packages is:

#apt-get -y remove --purge <package>
#apt-get clean

Once a week:
#debfoster

answer the questions as to which packages you want to keep, do not delete the ones you don't recognize, deborphan will show the ones that are dangling alone.

#deborphan

will give you a list of 'orphaned' libraries, to get rid of them:

#deborphan | xargs apt-get -y remove --purge

this will save you tons of space,

if i run this:

df -h

it shows i'm using less than 1 GB of space on my hd.

Last edited by macondo; 09-30-2004 at 12:25 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt-get dpkg error: files list file ... missing final newline PBSchmidt Debian 12 02-07-2017 11:41 PM
APT/dpkg errors! /var/lib/dpkg/status bassclarinet Debian 16 12-01-2011 10:24 AM
dpkg is dead! error in /var/lib/dpkg/available dezert_fox Debian 4 11-22-2011 11:28 AM
dpkg -i : installs all files as .gz Is that right? nmoog Debian 1 08-16-2004 09:50 AM
nano removes ifconfig ? shania Linux - Newbie 4 10-30-2003 04:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration