LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-28-2014, 12:04 PM   #1
adampski
Member
 
Registered: Dec 2012
Posts: 37

Rep: Reputation: Disabled
Easily manage installed packages


Hey there,

What utilities are available via exclusively CLI that enable me to easily manage my installed packages? For example, I often install some from the repos but later remove them and install them again, but from compile source codes. This often leaves me some duplicates and system confusion when managing things like daemons.

When I view all my installed packages (on Debian) with
Code:
dpkg-query -l
it has such a huge list and I don't even know what's relevant, important or connected to other essential binaries so I don't just want to go hacking away at packages.

I like Windows in the sense that (not just the GUI) but even by going to a specified directory (C:\Program Files\) you know what's what, i.e. they're sensibly named and ordered. It doesn't display dependencies but I want to know trips and tricks that makes me more comfortable when dealing with installed packages on a Linux machine, instead of being frightened to touch them.
 
Old 03-28-2014, 12:42 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by adampski View Post
Hey there,
What utilities are available via exclusively CLI that enable me to easily manage my installed packages? For example, I often install some from the repos but later remove them and install them again, but from compile source codes. This often leaves me some duplicates and system confusion when managing things like daemons. When I view all my installed packages (on Debian) with
Code:
dpkg-query -l
it has such a huge list and I don't even know what's relevant, important or connected to other essential binaries so I don't just want to go hacking away at packages.
If you remove a package through the same package manager you installed it with, it will tell you if you're going to break something else, or what depends on it. You can determine from there if you want to remove it or not. Pretty much all Linux distros do this, either with the RPM, yum, zypper, or apt-get commands. They have options to list, remove, and do lots of other things. The man pages can tell you this.
Quote:
I like Windows in the sense that (not just the GUI) but even by going to a specified directory (C:\Program Files\) you know what's what, i.e. they're sensibly named and ordered. It doesn't display dependencies but I want to know trips and tricks that makes me more comfortable when dealing with installed packages on a Linux machine, instead of being frightened to touch them.
Sorry, that's disingenuous. Windows MAY put programs into C:\Program Files...and it may not. It may put them anywhere it wants to, and often does. Binaries and other libraries are often spread out in numerous places, and the uninstall-shield program typically keeps track of all this, and removes them...just like the Linux package library does.
 
Old 03-28-2014, 12:49 PM   #3
adampski
Member
 
Registered: Dec 2012
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Sorry, that's disingenuous. Windows MAY put programs into C:\Program Files...and it may not. It may put them anywhere it wants to, and often does. Binaries and other libraries are often spread out in numerous places, and the uninstall-shield program typically keeps track of all this, and removes them...just like the Linux package library does.
OK, I appreciate I was being naive in that statement. I think I'm trying to portray my confidence in maintaining a Linux system, and trying to compare it to my confidence with a Windows system. I feel confident in utilities such as CCleaner to dispose of these unwanted/unused/unallocated binaries and libraries, are there similar utilities out there that can conduct such tasks?

When I compile/install packages, you see many lines of operations in the terminal and it makes you feel everything is being placed in so many locations of the system. You often feel that when you do a simple command of
Code:
apt-get remove program
that it can't possibly dispose of them all as you assume it doesn't keep track of them all. Especially as you progress to update the packages, modify them in such ways to change their operations so it may create further files which may be left redundant.

You can probably guess by my attitude that system resources are quite precious on this Linux machine I'm currently working on, which it is.
 
Old 03-28-2014, 02:15 PM   #4
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
Greetings
When KDE3 was going strong they had a superb little app called KPackage that could handle rpms, debs, and slackpacks. It also had a great intuitive UI with a list of installed packages on the left and on the right was the info page for any selected package. The right-side window had two tabs, one for basic package info, version, function , etc. and the 2nd with a list of all the paths to all the apps and libraries that were installed. They later changed it to KPackageKit which was not nearly as simple nor useful.

So since then I have installed just enough KDE3 libraries in /opt/kde/ to run the old KPackage and I still love it. With it any duplications are obvious and in 2 clicks the older version is gone. Truth be told, it is rare anymore that I have duplications but I like very much being able to see all that was installed with any package and where it was installed. It's just so much quicker than /var/log/packages and gives a great visual overview.
 
Old 03-28-2014, 02:29 PM   #5
adampski
Member
 
Registered: Dec 2012
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by enorbet View Post
Greetings
When KDE3 was going strong they had a superb little app called KPackage that could handle rpms, debs, and slackpacks. It also had a great intuitive UI with a list of installed packages on the left and on the right was the info page for any selected package. The right-side window had two tabs, one for basic package info, version, function , etc. and the 2nd with a list of all the paths to all the apps and libraries that were installed. They later changed it to KPackageKit which was not nearly as simple nor useful.

So since then I have installed just enough KDE3 libraries in /opt/kde/ to run the old KPackage and I still love it. With it any duplications are obvious and in 2 clicks the older version is gone. Truth be told, it is rare anymore that I have duplications but I like very much being able to see all that was installed with any package and where it was installed. It's just so much quicker than /var/log/packages and gives a great visual overview.
This sounds incredibly ideal, and pretty much how I feel about maintaining a system. Unfortunately I'm CLI orientated here with no GUI. Though you mention a) /var/log/packages is a key location for logs/reports of installed packages, thus able to identify duplicates (though I can imagine that being very tedious) and b) that you rarely see a duplicated package or library... So you feel my need to clean my machine isn't really important, as the requirement to do so isn't needed anymore?
 
Old 03-28-2014, 02:40 PM   #6
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
aptitude
 
Old 03-28-2014, 03:19 PM   #7
adampski
Member
 
Registered: Dec 2012
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by descendant_command View Post
aptitude
Is the recommended command over apt-get, yes.
 
Old 03-28-2014, 05:04 PM   #8
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
Quote:
Originally Posted by adampski View Post
This sounds incredibly ideal, and pretty much how I feel about maintaining a system. Unfortunately I'm CLI orientated here with no GUI. Though you mention a) /var/log/packages is a key location for logs/reports of installed packages, thus able to identify duplicates (though I can imagine that being very tedious) and b) that you rarely see a duplicated package or library... So you feel my need to clean my machine isn't really important, as the requirement to do so isn't needed anymore?
While there weren't many dependencies for KPackage so it wasn't/isn't at all hard to setup, it is a gui app, so I guess that won't work for you.

It used to be that all distros used /var/log/packages but unfortunately that has changed and each distro is different now, especially since systemd became in charge of so many logs. So ideally check on your distro's forums or with someone here who is running the same distro and version you are.

Once you locate the directory that lists your installed packages it really isn't tedious since they are in alphabetical order, have version numbers, and respond to pipe commands. My love of KPackage was that it did so much more, especially listing all installed files and paths. That too is available from CLI but I just liked the one-stop-shop.

Regarding cleaning your machine - simplicity is certainly best but thankfully Linux does not behave like Windows. Windows centralizes everything, and tries to help out the user by setting up prefetch, reserving memory, etc for an easy interface and a nice experience. Unfortunately this comes at a cost. Over time windows gets stacked up with spaghetti code and old cruft no longer used but still indexed and accommodated. Until there was CCleaner the only solution was clean install once things slowed to a crawl.

This doesn't happen in Linux. Things are more compartmentalized and having multiple versions is not really a problem and sometimes it's even needed. This is true even with windows programs run under wine in Linux. I have 5 versions of wine installed - 3 for 3 different games with different requirements, one for Pipelight, the Silverlight plugin, and one I could probably delete now but haven't yet.

Also, for reference, I'm running Slackware 14.0 but it started out as v 12.0 and has gone through a few partition clones to get moved to new hard drives and new motherboards and 4 complete system upgrades and is still lean 'n mean.
 
Old 03-28-2014, 05:52 PM   #9
adampski
Member
 
Registered: Dec 2012
Posts: 37

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by enorbet View Post
While there weren't many dependencies for KPackage so it wasn't/isn't at all hard to setup, it is a gui app, so I guess that won't work for you.

It used to be that all distros used /var/log/packages but unfortunately that has changed and each distro is different now, especially since systemd became in charge of so many logs. So ideally check on your distro's forums or with someone here who is running the same distro and version you are.

Once you locate the directory that lists your installed packages it really isn't tedious since they are in alphabetical order, have version numbers, and respond to pipe commands. My love of KPackage was that it did so much more, especially listing all installed files and paths. That too is available from CLI but I just liked the one-stop-shop.

Regarding cleaning your machine - simplicity is certainly best but thankfully Linux does not behave like Windows. Windows centralizes everything, and tries to help out the user by setting up prefetch, reserving memory, etc for an easy interface and a nice experience. Unfortunately this comes at a cost. Over time windows gets stacked up with spaghetti code and old cruft no longer used but still indexed and accommodated. Until there was CCleaner the only solution was clean install once things slowed to a crawl.

This doesn't happen in Linux. Things are more compartmentalized and having multiple versions is not really a problem and sometimes it's even needed. This is true even with windows programs run under wine in Linux. I have 5 versions of wine installed - 3 for 3 different games with different requirements, one for Pipelight, the Silverlight plugin, and one I could probably delete now but haven't yet.

Also, for reference, I'm running Slackware 14.0 but it started out as v 12.0 and has gone through a few partition clones to get moved to new hard drives and new motherboards and 4 complete system upgrades and is still lean 'n mean.
Do you not just feel the system is messy though? Knowing there is all that junk potentially lurking around? *ocd *
 
Old 03-28-2014, 06:17 PM   #10
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
type 'aptitude'
press <enter>
 
Old 03-29-2014, 05:44 AM   #11
enorbet
Senior Member
 
Registered: Jun 2003
Location: Virginia
Distribution: Slackware = Main OpSys
Posts: 4,784

Rep: Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434Reputation: 4434
Quote:
Originally Posted by adampski View Post
Do you not just feel the system is messy though? Knowing there is all that junk potentially lurking around? *ocd *
Don't you think you should write that "cod" in the proper order like it's supposed to be? :P
 
Old 03-29-2014, 09:19 AM   #12
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by adampski View Post
OK, I appreciate I was being naive in that statement. I think I'm trying to portray my confidence in maintaining a Linux system, and trying to compare it to my confidence with a Windows system. I feel confident in utilities such as CCleaner to dispose of these unwanted/unused/unallocated binaries and libraries, are there similar utilities out there that can conduct such tasks?
The only reason CCleaner works, is because when (IF) Windows installs a program through the install-shield/whatever it uses , it writes traces of where the files go into the registry. This is a very good analogy to what Linux does with the package database. The big difference here, is that Linux can use source-code for installation...which means that files aren't registered into the database. Which is the same thing that would happen on a Windows system, if you ever installed (could install), a package from source.

If you install a package, your package management utility will remove the files. If you install from source, you should easily be able to run "make uninstall", and it will REMOVE the files it put out there manually.
Quote:
When I compile/install packages, you see many lines of operations in the terminal and it makes you feel everything is being placed in so many locations of the system. You often feel that when you do a simple command of
Code:
apt-get remove program
that it can't possibly dispose of them all as you assume it doesn't keep track of them all. Especially as you progress to update the packages, modify them in such ways to change their operations so it may create further files which may be left redundant.
Sorry, that's not true. You see many lines scroll by, because the package is being BUILT and linked. The package manager does keep track of and dispose of them all, and I have no idea why you would think it 'can't possibly' do it. Packages installed are in the package database...each and every file. When you remove one, it does dependency checking, and will alert you if you're going to break another package, and will remove ALL the files if it tell it to.

This is why you should ALWAYS install packages rather than source code, unless you have no other option. That may be needing a very bleeding-edge feature, or if there just isn't a package available for something you need.
Quote:
You can probably guess by my attitude that system resources are quite precious on this Linux machine I'm currently working on, which it is.
What resources are limited on your Linux system, and why?? Linux runs just fine on an 800MHz netbook with a 20 GB hard drive....and can run on even FEWER resources than that.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Easily manage your PPA in Ubuntu with Y PPA Manager LXer Syndicated Linux News 0 08-12-2012 07:10 PM
LXer: Linberry: Easily Manage Your Blackberry Smartphone with Ubuntu/Linux LXer Syndicated Linux News 0 04-12-2012 11:10 AM
daloRADIUS - Easily Deploy and Manage HotSpots and RADIUS Systems liri Linux - News 5 10-25-2010 07:56 AM
How to easily manage several audio players? General General 1 06-18-2006 05:04 AM
How to install packages easily in SuSe? J_Szucs Linux - Newbie 2 09-11-2002 06:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:49 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