LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-20-2004, 04:41 PM   #1
talkingwires
Member
 
Registered: Jan 2004
Location: Boone, NC
Distribution: Debian SID
Posts: 49

Rep: Reputation: 15
Removing Packages (quick question)


Okay, this is probably a complete newbie question, but I tried a search but didn't turn up anything. Here goes:

I'd like to remove some stuff from Debian. Mostly all the games, a big portion of KDE (keeping just the core for running the occasion QT app), and some of the more useless Gnome utilites. Y'know, stuff I'll never use. My problem is when I try to remove a file using Synaptic Package Manager, it tries to remove a lot of stuff related to the file that I kinda need. For example, when I try to kill off some random Gnome utility, it tries to remove Gnome along with the utility. There has to be a way around this, but I can't figure it out. Any help?
 
Old 09-20-2004, 04:50 PM   #2
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
To remove package foo:
Code:
apt-get remove foo
If there is some spesific problem with some spesific package, please give the output of the above command and let's see what is wrong with it.
 
Old 09-20-2004, 04:54 PM   #3
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
In additon to what ToniT said you can also do

apt-get remove --purge foo

Which also removes and configuration files, and other misc pieces for foo.
 
Old 09-20-2004, 04:58 PM   #4
talkingwires
Member
 
Registered: Jan 2004
Location: Boone, NC
Distribution: Debian SID
Posts: 49

Original Poster
Rep: Reputation: 15
Yes, I can remove packages that way. However, I'd prefer to use the Synaptic Package Manager, so I can have a nice overview of what's installed and browse through it easily. Removing packages from the command line requires closing the Package Manager down, removing the package, and launching the Package Manager again, since it puts a lock on the package database while it is open.

Edit: For example, try marking kde-games for removal in the Package Manager. When you hit "Apply", it will try to remove kde, too.

Last edited by talkingwires; 09-20-2004 at 04:59 PM.
 
Old 09-20-2004, 05:44 PM   #5
ToniT
Senior Member
 
Registered: Oct 2003
Location: Zurich, Switzerland
Distribution: Debian/unstable
Posts: 1,357

Rep: Reputation: 47
kde is a metapackage that depends on all the kde software. So, in a package management sense, if you remove kde-games (which is also a metapackage depending on all the kde games), you don't have the whole kde anymore, but just independent parts of it.
 
Old 09-20-2004, 07:42 PM   #6
talkingwires
Member
 
Registered: Jan 2004
Location: Boone, NC
Distribution: Debian SID
Posts: 49

Original Poster
Rep: Reputation: 15
Oh. Well, that kinda sucks.
 
Old 09-20-2004, 07:47 PM   #7
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
Not really, as when you remove a meta-package you don't remove the actual things it installed. KDE won't disappear if you remove the kde meta-package.
 
Old 09-21-2004, 12:32 AM   #8
the_shaman
Member
 
Registered: Sep 2004
Distribution: Debian Sid
Posts: 34

Rep: Reputation: 15
talkingwires, while Synaptic is all nice and spiffy as with all GUI apps, you can never know when it will fail to fire up i.e. could well be at the next upgrade to Synaptic . So better get attuned to commands like COLUMNS=200 dpkg -l | less; apt-get -dy dist-upgrade; apt-get --reinstall install package; apt-get --purge remove package; apt-get -t unstable build-dep unstable package; apt-get -t unstable --build source package; dpkg --purge package; apt-cache search package; apt-cache show package; apt-cache showpkg package; apt-cache depend package; apt-cache rdepend package; apt-cache showsrc package; echo package hold|dpkg --set-selections; echo package install|dpkg --set-selections; dpkg --get-selections | grep package; dpkg -S, dpkg --listfiles and handy utilities like apt-show-versions, wajig and APT Pinning.

Also the minute you get to a dpkg install error e.g.
dpkg: error while cleaning up:
subprocess post-removal script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/bash_3.0-4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Synaptic will throw exit the install and you'll be left to rectify the prob in a terminal . So might as well get used to the apt and dpkg commands e.g. dpkg --force overwite -i /path-to-cached-package.

Last edited by the_shaman; 09-21-2004 at 12:40 AM.
 
Old 03-13-2009, 11:52 AM   #9
eclypse80
LQ Newbie
 
Registered: Jun 2007
Posts: 7

Rep: Reputation: 0
Quote:
Originally Posted by leonscape View Post
Not really, as when you remove a meta-package you don't remove the actual things it installed. KDE won't disappear if you remove the kde meta-package.
Is this statement accurate. Why is it when I remove kdegames, which wants to remove the kde metapackage, does it proceed to uninstall all my cd players and other things not specifically listed in kdegames?

Code:
:~> sudo aptitude remove kdegames
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
The following packages are BROKEN:
  kde
The following packages will be REMOVED:
  kdegames
0 packages upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 53.2kB will be freed.
The following packages have unmet dependencies:
  kde: Depends: kdegames (>= 4:3.5.5) but it is not installable
The following actions will resolve these dependencies:

Remove the following packages:
kde

Score is 119

Accept this solution? [Y/n/q/?] Y
The following packages will be REMOVED:
  amor{u} ark{u} artsbuilder{u} atlantik{u} atlantikdesigner{u} blinken{u} dosfstools{u} edict{u} eyesapplet{u} fifteenapplet{u} indi{u} juk{u} kaddressbook-plugins{u} kalzium{u} kalzium-data{u}
  kanagram{u} kanjidic{u} kasteroids{u} kate-plugins{u} katomic{u} kaudiocreator{u} kbackgammon{u} kbattleship{u} kblackbox{u} kbounce{u} kbruch{u} kbstate{u} kcalc{u} kcharselect{u}
  kcoloredit{u} kde{a} kdeaccessibility{u} kdeaddons{u} kdeaddons-kfile-plugins{u} kdeartwork{u} kdeartwork-emoticons{u} kdeartwork-misc{u} kdeartwork-style{u} kdeartwork-theme-icon{u}
  kdeartwork-theme-window{u} kdeedu{u} kdeedu-data{u} kdegames kdegames-card-data{u} kdegraphics{u} kdegraphics-kfile-plugins{u} kdelirc{u} kdemultimedia{u} kdemultimedia-kappfinder-data{u}
  kdemultimedia-kfile-plugins{u} kdessh{u} kdetoys{u} kdeutils{u} kdewallpapers{u} kdewebdev{u} kdf{u} kdvi{u} kedit{u} keduca{u} kenolaba{u} kfax{u} kfaxview{u} kfilereplace{u} kfloppy{u}
  kfouleggs{u} kgamma{u} kgeography{u} kgeography-data{u} kgoldrunner{u} kgpg{u} khangman{u} khexedit{u} kicker-applets{u} kiconedit{u} kig{u} kimagemapeditor{u} kiten{u} kjots{u} kjumpingcube{u}
  klatin{u} klettres{u} klettres-data{u} klickety{u} klines{u} klinkstatus{u} kmag{u} kmahjongg{u} kmid{u} kmilo{u} kmines{u} kmix{u} kmoon{u} kmousetool{u} kmouth{u} kmplot{u} kmrml{u}
  knetwalk{u} knewsticker-scripts{u} kodo{u} kolf{u} kolourpaint{u} kommander{u} konq-plugins{u} konquest{u} kooka{u} kpat{u} kpercentage{u} kpoker{u} kpovmodeler{u} krec{u} kreversi{u} kruler{u}
  ksame{u} ksayit{u} kscd{u} kscreensaver{u} kshisen{u} ksig{u} ksim{u} ksirtet{u} ksmiletris{u} ksnake{u} ksnapshot{u} ksokoban{u} kspaceduel{u} kstars{u} kstars-data{u} ksvg{u} kteatime{u}
  ktimer{u} ktouch{u} ktron{u} kttsd{u} ktuberling{u} kturtle{u} ktux{u} kuickshow{u} kverbos{u} kview{u} kviewshell{u} kvoctrain{u} kwalletmanager{u} kweather{u} kwin4{u} kwordquiz{u}
  kworldclock{u} kxsldbg{u} libarts1-audiofile{u} libarts1-mpeglib{u} libarts1-xine{u} libboost-python1.34.1{u} libconvert-binhex-perl{u} libcrypt-ssleay-perl{u} libdb4.6++{u}
  libfinance-quote-perl{u} libhtml-tableextract-perl{u} libio-stringy-perl{u} libkdeedu3{u} libkdegames1{u} libkiten1{u} libkscan1{u} libmime-tools-perl{u} libnews-nntpclient-perl{u}
  libpoppler-qt2{u} libtidy-0.99-0{u} libtiff-tools{u} lskat{u} mpeglib{u} noatun{u} noatun-plugins{u} quanta{u} quanta-data{u} superkaramba{u} tidy{u} ttf-dustin{u} ttf-kochi-gothic{u}
  ttf-sjfonts{u}
0 packages upgraded, 0 newly installed, 177 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 303MB will be freed.
Do you want to continue? [Y/n/?]
 
Old 03-13-2009, 07:24 PM   #10
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
Quote:
Originally Posted by eclypse80 View Post
Is this statement accurate. Why is it when I remove kdegames, which wants to remove the kde metapackage, does it proceed to uninstall all my cd players and other things not specifically listed in kdegames?
It's accurate if you use apt-get, not if you use aptitude (as you do below). If you want to surgically remove a single package from a metapackage and leave the rest alone - and you normally use aptitude - do this:
Code:
apt-get remove kdegames
aptitude keep-all
Then you should be fine.

Last edited by Telemachos; 03-13-2009 at 07:36 PM.
 
Old 03-16-2009, 12:41 PM   #11
eclypse80
LQ Newbie
 
Registered: Jun 2007
Posts: 7

Rep: Reputation: 0
Thanks for the pointer, however that didn't quite work either. Since kdegames itself is a metapackage, the apt-get command removed just the metapackages kdegames and kde with the apt-get remove kdegames command.

I guess what I need to do instead is remove the individual packages listed in the kdegames metapackage using apt-get.

Seems there should be an easier way that I have not found yet.


Code:
# apt-get remove kdegames
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  knetwalk kpat kalzium-data ksokoban kolf kdemultimedia-kappfinder-data blinken krec libdb4.6++ kscd kshisen kmoon kdeartwork-style kmahjongg ksig ksim libkscan1 kcharselect kcoloredit artsbuilder
  kdessh kanagram kdeartwork-theme-window kmrml katomic ksvg kruler kdemultimedia-kfile-plugins ktux libio-stringy-perl klettres kgoldrunner kbackgammon kpoker atlantikdesigner libkiten1 kgeography
  ksnapshot kooka kenolaba kblackbox libboost-python1.34.1 libnews-nntpclient-perl klatin kfloppy kstars ttf-dustin libcrypt-ssleay-perl ksame kbruch kdeaddons-kfile-plugins kfilereplace
  libmime-tools-perl kcalc kicker-applets libpoppler-qt2 dosfstools keduca libarts1-xine knewsticker-scripts kaudiocreator kdeedu-data kimagemapeditor kwalletmanager kweather kmplot ttf-kochi-gothic
  kalzium klinkstatus klickety kpovmodeler ksayit konq-plugins kmouth kworldclock mpeglib kdewebdev amor kdeaccessibility ktouch khexedit kedit kbounce kvoctrain kdetoys atlantik kbstate tidy ark
  kwordquiz superkaramba kview noatun-plugins ktron kdegraphics-kfile-plugins ttf-sjfonts kttsd kwin4 kate-plugins kdeaddons kreversi kdf kspaceduel kig juk noatun klines kfaxview kstars-data edict
  lskat kviewshell kgamma kommander kdegames-card-data libarts1-mpeglib kaddressbook-plugins kgeography-data kdeutils kjumpingcube kdegraphics khangman libfinance-quote-perl kdeartwork-theme-icon
  kdeartwork-misc kscreensaver kanjidic ksmiletris kxsldbg quanta kbattleship kiconedit kasteroids kfouleggs libkdeedu3 ksnake kiten libtiff-tools eyesapplet indi kdeedu kdewallpapers kdelirc
  kpercentage libkdegames1 kjots klettres-data kfax kdeartwork-emoticons libconvert-binhex-perl ksirtet kmines kdvi kuickshow kgpg konquest kolourpaint fifteenapplet kdemultimedia kmousetool kmag
  libtidy-0.99-0 libhtml-tableextract-perl kmilo ktuberling kturtle ktimer quanta-data kmid kteatime kverbos kmix kdeartwork kodo libarts1-audiofile
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  kde kdegames
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 94.2kB disk space will be freed.
Do you want to continue [Y/n]? Y
(Reading database ... 328491 files and directories currently installed.)
Removing kde ...
Removing kdegames ...
mcarvalh-deb5-64:/home/mcarvalh# aptitude keep-all
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Writing extended state information... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Reading task descriptions... Done
kde and kdegames are now gone, but since kdegames itself was a metapackage, the packages it install remained, for example atlantik
Code:
# dpkg -l | grep atlantik
ii  atlantik                                                4:3.5.10-1                    KDE client for Monopoly-like network games
ii  atlantikdesigner                                        4:3.5.9-2                     game board designer for Atlantik
 
Old 03-16-2009, 07:26 PM   #12
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
Quote:
Originally Posted by eclypse80 View Post
Thanks for the pointer, however that didn't quite work either. Since kdegames itself is a metapackage, the apt-get command removed just the metapackages kdegames and kde with the apt-get remove kdegames command.

I guess what I need to do instead is remove the individual packages listed in the kdegames metapackage using apt-get.
My advice was aimed at the situation where you didn't want to remove all the other packages (that's why I said "surgically remove").

But yes, if you did want to remove everything, you can do it explicitly by listing the individual package names from here.
 
Old 03-16-2009, 07:53 PM   #13
kushalkoolwal
Senior Member
 
Registered: Feb 2004
Location: Middle of nowhere
Distribution: Debian Squeeze
Posts: 1,249

Rep: Reputation: 49
Quote:
Originally Posted by talkingwires View Post
Okay, this is probably a complete newbie question, but I tried a search but didn't turn up anything. Here goes:

I'd like to remove some stuff from Debian. Mostly all the games, a big portion of KDE (keeping just the core for running the occasion QT app), and some of the more useless Gnome utilites. Y'know, stuff I'll never use. My problem is when I try to remove a file using Synaptic Package Manager, it tries to remove a lot of stuff related to the file that I kinda need. For example, when I try to kill off some random Gnome utility, it tries to remove Gnome along with the utility. There has to be a way around this, but I can't figure it out. Any help?
Your best option WAS when you decided to install was to do:
Code:
apt-get install xserver-xorg-core xfonts-base kde-core kdm
Then you can selectively installed whatever kde software you would like to install.
 
Old 03-16-2009, 10:41 PM   #14
craigevil
Senior Member
 
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,883
Blog Entries: 28

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
Turn off autoremove as well as recommends/suggests when installing things.


Create a apt.conf or modify it if it already exists and add the following:

/ auto-remove breaks on meta packages
APT::Get::AutomaticRemove "0";
APT::Get::HideAutoRemove "1";

// Recommends are as of now still abused in many packages
APT::Install-Recommends "0";
APT::Install-Suggests "0";
Debug::pkgAutoRemove "0";

And use apt-get rather than aptitude especially if you are running testing or sid, and if you tend to install/remove packages a lot.

My suggestion would be to remove the metapackages then tell apt-get to reinstall the individual packages.

I use the above in my apt.conf and I try not to install metapackages, in the 5 yrs of running Sid I have had very few issues with things wanting to be removed that I didn't want to remove.
 
Old 03-17-2009, 06:38 AM   #15
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 60
Quote:
Originally Posted by craigevil View Post
And use apt-get rather than aptitude especially if you are running testing or sid, and if you tend to install/remove packages a lot.
This is a preference - and you have every right to it - but there's nothing wrong with Aptitude even for Testing and Sid. (I use it on both.)
 
  


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
Quick question regarding installing packages in freebsd obelxi *BSD 1 03-15-2005 01:08 PM
removing certain packages Smokey Red Hat 1 10-02-2004 07:55 PM
removing packages robson8112 Linux - General 3 01-21-2004 03:34 PM
Question on removing redhat-config-packages techrolla Fedora 2 11-24-2003 04:59 PM
removing packages..??? mhd_Ahmed Linux - Newbie 4 08-22-2003 12:46 PM

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

All times are GMT -5. The time now is 10:54 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
Open Source Consulting | Domain Registration