List of user installed apps

Sascha Güthling guethling at googlemail.com
Mon Aug 31 13:45:55 BST 2009


> Nigel, i asked a similar question a while ago, let me quote from the
> ancient thread:
>
> Willy K. Hamra wrote:
>> i cleaned my system from almost all the packages i don't want, digging
>> through the installed packages for more unnecessary ones, which i guess
>> is a good enough punishment for my lack of organization, random apt-get
>> sprees, and installing loads of packages at once without bothering to
>> read through them, just because some website suggested so :-P
>
> Willy,
>
> I don't think there is anything to worry about. Even if you don't use
> aptitude, you should be able to achieve what you want. For some reason,
> I only use apt-get and not aptitude ('cos I am familiar with it), and I
> like to achieve exactly what you are looking for.
>
> Declaratively, what you want is:
> You want to move from version A to version B (could be, that for a fresh
> re-install, A = B).
>
> You want to:
> -----------
>
> - Start with a clean install of version B
> - NOT remove any packages that are part of the default install of
> version B (safety)
>
> - Know what additional packages you installed in version A - List1
>
> - Derive the "top-level" packages that you asked for and not list all
> the new packages include those installed as dependencies - List2
>
> - Use either List1 or List2 to quickly get Version B as close as
> possible to the current state of Version A
>
> Declaratively this becomes:
> --------------------------
>
> Amongst the packages currently installed, select those that are not part
> of the default install - List 1
>
> Amongst List 1, select those that are "orphans" (top-level packages) - List2
>
> To do this, all you need are the standard tools (dpkg, grep cut etc) and
> deborphan. From the man page: "deborphan finds  packages that have no
> packages depending on them. The default operation is to search only
> within the libs  and  oldlibs  sections to hunt down unused libraries".
> If it's not installed you should install deborphan.
>
> On the clean install (even if it is a new distro), run
> dpkg --get-selections | cut -f1 -d '    '> default-list
>
> Note that the character between single quotes after cut -d is a TAB
> (enter it using CRTL-V, CTRL-TAB on the command line)
>
> You can do this e.g. by booting the LiveCD of your current (or new)
> distro. If you use the live-cd, copy default-list to some place on your
> currently installed version and reboot into your current version.
>
> In the current version run
> dpkg --get-selections | cut -f1 -d '    '> current-list
>
> Note that the character between single quotes after cut -d is a TAB
> (enter it using CRTL-V, CTRL-TAB on the command line)
>
> In the current version run
> deborphan --no-show-section -a > current-top-level
>
> cat current-list | grep -vFx -f default-list > new-packages
> This (new-packages) is List1
>
> cat new-packages| grep -Fx -f current-top-level > packages-to-install
> This (packages-to-install) is List2
>
> If you want to just install Version B and get it as close to your
> current state of version A as possible, I would recommend you do the
> default install, and then install everything in List1 (can also use
> List2 if you want).
>
> If you want to peruse the list of top-level packages you have asked for
> and installed, that is List2 - you MUST have asked for all these, since
> they are top-level packages. Note that there MAY be other packages that
> you had asked for and installed that are not in List2 but are in List1,
> but do not appear in List2 because they are no longer top-level
> "orphans" because since then you installed another package that depends
> on these.
>
> Hope this helps.
>
> Sundar Nagarajan
>
>
> --
> Willy K. Hamra
> Manager of Hamra Information Systems
>

Willy,

I followed your guide and ended up with the lists. Now if I understand
right I would have to install all the packages in List2
(packages-to-install) in addition to the base install and would have
all the programs I installed on the old system including all there
current dependencies. Right?

But I am missing packages I know I installed myself on the system in
the packages-to-install list. And some of these packages seem to be
top-level orphans as well.

For example gimp. If I do a aptitude -s remove gimp it tells me it
will only remove the package gimp, meaning no other package depends on
gimp, making it a top-level orphan in my opinion. Shouldn't gimp be in
the packages-to-install list then?

Is it a lack of understanding the how-to or is something not working
the way it should?

I would greatly appreciate if we could find a way to make that work
correctly since I wanted a solution like that for a long time.

Cheers,
Sascha



More information about the kubuntu-users mailing list