You are not logged in.

#1 2011-11-10 21:09:50

examon
Member
Registered: 2011-05-07
Posts: 208

[SOLVED] pacman, remove last N installed packages

I installed some packages (~60). Is there any possibility to remove them in the way they have been installed?

Last edited by examon (2011-11-12 22:28:50)

Offline

#2 2011-11-10 21:13:11

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] pacman, remove last N installed packages

You can clean you cache or remove some particular packages the usual was with 'pacman -R' If all those packages were installed as a dependency of one or two packages, removing those two packages + their dependencies should do the trick.
You can use pacman's log to get the names of the packages.

Last edited by karol (2011-11-10 21:13:36)

Offline

#3 2011-11-10 21:40:28

examon
Member
Registered: 2011-05-07
Posts: 208

Re: [SOLVED] pacman, remove last N installed packages

Thx karol, I know I can do it like that, but I wanted to know that if is there any pacman's function like "remove last N installed packages" or so

Offline

#4 2011-11-10 21:48:17

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] pacman, remove last N installed packages

If you're using [testing], you can install pacman-contrib 4.
If you only installed packages, try

paclog-pkglist /var/log/pacman.log | cut -d ' ' -f 1

to get the list, cut it where needed and feed to pacman.

Offline

#5 2011-11-10 21:49:59

examon
Member
Registered: 2011-05-07
Posts: 208

Re: [SOLVED] pacman, remove last N installed packages

it looks good, thx karol

Offline

#6 2011-11-12 21:42:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] pacman, remove last N installed packages

Please remember to mark as solved.

Offline

#7 2011-11-12 21:55:15

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] pacman, remove last N installed packages

paclog-pkglist has no regard for install order -- its output is in lexical order.

Offline

#8 2011-11-12 21:57:39

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] pacman, remove last N installed packages

falconindy wrote:

paclog-pkglist has no regard for install order -- its output is in lexical order.

Oh yes, I should probably say cut (pacman's log) first, run paclog-pkglist later, like so:

paclog-pkglist <(tail -100 /var/log/pacman.log  | grep installed)

Edit: https://bbs.archlinux.org/viewtopic.php … 87#p626487 is 'pacman -Syu'-focused but may be of some help.

Last edited by karol (2011-11-12 22:06:46)

Offline

Board footer

Powered by FluxBB