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? |
To remove package foo:
Code:
apt-get remove foo |
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. |
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. |
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.
|
Oh. Well, that kinda sucks.
|
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.
|
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 :D. So might as well get used to the apt and dpkg commands e.g. dpkg --force overwite -i /path-to-cached-package. :) |
Quote:
Code:
:~> sudo aptitude remove kdegames |
Quote:
Code:
apt-get remove kdegames |
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 Code:
# dpkg -l | grep atlantik |
Quote:
But yes, if you did want to remove everything, you can do it explicitly by listing the individual package names from here. |
Quote:
Code:
apt-get install xserver-xorg-core xfonts-base kde-core kdm |
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. |
Quote:
|
All times are GMT -5. The time now is 12:16 PM. |