On Saturday 01 January 2011 04:30 AM, Kussh Singh wrote:
On Fri, Dec 31, 2010 at 12:42 PM, Raghu Prasadprasad.raghu.k@gmail.comwrote:
From your description, I haven't understood your requirement very well. Though I suspect you might be looking at something like this:
dpkg --get-selections | sed -es'![ \t]+.+$!!' | tee /var/tmp/installed-software | xargs apt-cache depends
/var/tmp/software-dpendencies
It lists down all the dependencies/suggestions/conflicts of packages installed on your system. If you just want to find out dependencies of few select packages you want to remove, then put their names (one per line) in a file, (say packages-to-remove) and run the following:
cat packages-to-remove | xargs apt-cache depends>/var/tmp/pkg-dpendencies
Raghu
Thank you for the info. I was thinking of removing certain packages in one go that were tried out but were not found suitable in a new installation--so description of all packages installed earlier was needed. Thank you for your response. I guess I will have to go thru the apt documentation fairly rigorously in order to get the description of each package in one go.
That would be easy. Just list down such packages in a file, say pkgs_to_remove.txt; one per line. Then run the following:
cat pkgs_to_remove.txt | xargs apt-get remove
It will remove all such packages in one go. Then there could be some packages/libraries which were installed as part of some of the packages you had just removed. To remove all those packages which are no longer needed in the system, run the following:
apt-get autoremove
From the man page of apt-get:
"autoremove is used to remove packages that were automatically installed to satisfy dependencies for some package and that are no more needed."
Raghu