You are not logged in.

#1 2007-01-14 20:27:33

ravisghosh
Member
From: Intergalactic Spaces
Registered: 2006-10-12
Posts: 516
Website

pacnew and pacsave

When you do "pacman -Rs" for some software, it leaves some configuration files and other stuffs related to that software. If I'm not going to use that software in future, it becomes piling garbage and it will be difficult to locate and delete huge amount of garbage. Is there a way to find and get rid of this garbage?

Offline

#2 2007-01-14 20:33:29

twiistedkaos
Member
Registered: 2006-05-20
Posts: 666

Re: pacnew and pacsave

ravisghosh wrote:

When you do "pacman -Rs" for some software, it leaves some configuration files and other stuffs related to that software. If I'm not going to use that software in future, it becomes piling garbage and it will be difficult to locate and delete huge amount of garbage. Is there a way to find and get rid of this garbage?

pacman -Rsn <file>

the n is --nosave which removes those file also.

For futher pacman informations:
man pacman full all its features and how to use them.

Offline

#3 2007-01-14 20:49:57

ravisghosh
Member
From: Intergalactic Spaces
Registered: 2006-10-12
Posts: 516
Website

Re: pacnew and pacsave

thanks a lot twiistedkaos for that. but how about deleting the old garbage.

Offline

#4 2007-01-14 22:16:06

Mefju
Member
From: Poland
Registered: 2006-07-12
Posts: 104

Re: pacnew and pacsave

Just do as root

find /etc/ -name "*.pac*" -print0 | xargs -r0 rm

Offline

#5 2007-01-14 23:08:00

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: pacnew and pacsave

what?!  Dude, acquaint yourself with the find man page:

find /etc -name "*.pac*" -exec rm {} ;

That'll just delete it, if you want to confirm each deletion you can use:

find /etc -name "*.pac*" -ok rm {} ;

And, yes, the backsplash and semi-colon are essential.

Offline

#6 2007-01-15 02:40:45

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: pacnew and pacsave

I hate find syntax. I'd have done:

rm $(find /etc -name "*.pac*")

or

rm -i $(find /etc -name "*.pac*")

to confirm.

To each his own, of course, I just find this way more readable and left to righty.

Dusty

Offline

#7 2007-01-15 15:16:22

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: pacnew and pacsave

To each his own of course...but could I get away with arguing that piping and nesting is a recipe for trouble where root and rm are involved? OT I know smile

Offline

#8 2007-01-15 16:18:40

Snarkout
Member
Registered: 2005-11-13
Posts: 542

Re: pacnew and pacsave

-print FTW.  I have seen more posts about "I ran this find command as root  and now half of /etc is gone - PLZ HELP!!!" than I care to think about.  I also agree with dusty - the syntax for find is anything but intuitive.


Unthinking respect for authority is the greatest enemy of truth.
-Albert Einstein

Offline

#9 2007-01-15 16:20:11

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,899
Website

Re: pacnew and pacsave

mv or cp somewhere rather than rm [check them first]?

/me goes to clear out /etc


Mr Green

Offline

#10 2007-01-15 23:57:02

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: pacnew and pacsave

You got it all wrong.

# find /boot /etc -name '*.pacsave' -print0 | xargs -0 rm -f

P.S.: -exec sucks, it has security and performance issues (and looks weird).

;]


1000

Offline

#11 2007-04-30 03:35:30

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: pacnew and pacsave

Since this is deleting files, we can use:

find /boot /etc -name '*.pacsave' -delete

Offline

Board footer

Powered by FluxBB