On 2011-07-19, Tech Geek <[email protected]> wrote:
> Hi,
>
> After upgrading, installing and removing some packages from Lenny to
> Squeeze, I ended up with the following situation:
>
> debian6.0# dpkg --get-selections > packages.txt
> debian6.0# cat packages | grep purge

(Save yourself a few keystrokes: just type 'grep purge packages.txt'.)

> cpp-4.4                                         purge
> dmsetup                                         purge
> gcc-4.4-base                                    purge
> insserv                                         purge
> libbsd0                                         purge
> libc-bin                                        purge
> libcap2                                         purge
> libdb4.8                                        purge
> libgssapi-krb5-2                                purge
> libiw30                                         purge
> libk5crypto3                                    purge
> libkrb5support0                                 purge
> liblzma2                                        purge
> libmpfr4                                        purge
> libopts25                                       purge
> libreadline6                                    purge
> libudev0                                        purge
> sensible-utils                                  purge
> xz-utils                                        purge
>
> My question is very simple: How can I set the status of the above
> packages from "purge" to "install" since I know these packages are
> installed on my system and I do intend to keep them installed.
>

This should do it:

        sed -i 's/purge$/install/' packages.txt
        dpkg --set-selections < packages.txt

-- 
Liam O'Toole
Cork, Ireland


-- 
To UNSUBSCRIBE, email to [email protected] 
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to