You are not logged in.

#1 2020-01-26 13:48:57

1045io
Member
Registered: 2020-01-26
Posts: 7

It's secure to remove these log files? [SOLVED]

Hello, I would like to remove these log files:

/var/log/lastlog
/var/log/pacman.log
/var/log/tallylog
/var/log/wtmp

after deletion they will be recreated? In other words, which system log files it's safe to remove from /var/log?

Last edited by 1045io (2020-01-26 16:27:57)

Offline

#2 2020-01-26 13:58:12

teckk
Member
Registered: 2013-02-21
Posts: 519

Re: It's secure to remove these log files? [SOLVED]

I would not get rid of any of them, they are log files, they don't take up much space. I definitely would not delete /var/log/pacman.log.'

I fact I broke mine up on one machine(9 year old install)
/var/log/pacman1.log
/var/log/pacman2.log
/var/log/pacman3.log
/var/log/pacman.log

Why do you want/need to delete them?

Offline

#3 2020-01-26 14:14:30

1045io
Member
Registered: 2020-01-26
Posts: 7

Re: It's secure to remove these log files? [SOLVED]

To clean up logs, because I have a custom software that displays them (and is quite annoying to me to watch them on my desktop every moment), It's safe to remove some lines from /var/log/pacman.log?

Offline

#4 2020-01-26 14:16:48

1045io
Member
Registered: 2020-01-26
Posts: 7

Re: It's secure to remove these log files? [SOLVED]

And again, which system log files it's safe to remove from /var/log? or other locations like /opt? (always speaking for system stuff)

Offline

#5 2020-01-26 14:26:26

teckk
Member
Registered: 2013-02-21
Posts: 519

Re: It's secure to remove these log files? [SOLVED]

It's safe to remove some lines from /var/log/pacman.log?

Yes, it's just a text log file. Not wise though if you want to troubleshoot something later. This is a rolling release. Log files are most handy.

And again, which system log files it's safe to remove from /var/log?

My answer is none. Someone else may think differently. But it's your machine, do what you want.

Offline

#6 2020-01-26 14:38:36

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: It's secure to remove these log files? [SOLVED]

It's safe, yes. But I wouldn't say that it's a good idea - what are you going to do when you need the log files to troubleshoot an issue or look up information?

It would be far better to rewrite the custom software you are using to filter out any unnecasary information from being displayed and to keep the log files intact.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2020-01-26 14:42:42

1045io
Member
Registered: 2020-01-26
Posts: 7

Re: It's secure to remove these log files? [SOLVED]

Except of pacman.log, where can I read more info about those (lastlog, tallylog, wtmp) log files? Any documentation/wiki about Arch Linux log files out there?

Offline

#8 2020-01-26 14:51:17

1045io
Member
Registered: 2020-01-26
Posts: 7

Re: It's secure to remove these log files? [SOLVED]

Slithery wrote:

It's safe, yes.

You mean all of them? Or just pacman.log?

Slithery wrote:

But I wouldn't say that it's a good idea - what are you going to do when you need the log files to troubleshoot an issue or look up information?

Are saved in a database.

Slithery wrote:

It would be far better to rewrite the custom software you are using to filter out any unnecasary information from being displayed and to keep the log files intact.

I thought so too.

Offline

#9 2020-01-26 15:44:40

seth
Member
Registered: 2012-09-03
Posts: 51,253

Re: It's secure to remove these log files? [SOLVED]

man pam_tally
man lastlog
man wtmp

Those are login records, whether it's "safe" to mess with them depends on the context:
Your system will not explode or be otherwise broken, but there might be legal repercussions if you're not supposed to mess with this data.

+1 for fixing the actual problem and leaving the logs intact. If you encounter issues and ask here, you might be asked for your pacman log. If it looks doctored, you can't expect help (notably since the log is now invalid)

Offline

#10 2020-01-26 16:25:02

1045io
Member
Registered: 2020-01-26
Posts: 7

Re: It's secure to remove these log files? [SOLVED]

I'll read those man pages, thanks for everyone's help.

Offline

Board footer

Powered by FluxBB