Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Actually, I don't think you can cripple a system by deleting anything in /var, but you may mess it up at least for one session.
It depends on what do you mean by "cripple". More than probably:
Your package manager will stop working, completely. Your distro will no longer be a ditro, since it won't be aware of what a package is or what packages are installed. It will be frozen in time forever.
A lot of services requiring spooling will stop working. That includes mail server, print servers, etc.
If you use your machine as a web server, your web is gone, a nice one there.
Programs currently running will get confused. Some of them might malfunction or even crash, mind of /var/run/*
Your databases: gone.
Your system logs: gone, and the sys logger will probably stop working as well, since most of them require a minimal directory structures under /var/
Some others that I haven't though of right now.
That's crippling enough for me. But yeah, there will be some minimal functionality that will permit you to operate to restore your system. I doubt it would be worth your time however, I'd rather backup whatever needs to be backed up and then reinstall.
what if i ust remove /var/logs or /var/log is that ok?
It's probably OK to remove /var/log/*. It would be safer to do it in single user mode. Some programs may not be happy; I think bootlogd wants to find an old log file (can be empty). If you don't want the logs you could use a tempfs file system for /var/log and it would disappear at shutdown.
Some loggers might need some dubdirectories in there. It depends on the logger and on the config. I am not sure if that would stop the syslogger from running or would just cause some warnings at startup.
Some programs might do slightly strange things when the system logger is not working. But it should be nothing major (besides the fact that you lose virtually all the chances to diagnose any possible problem in your system).
If you do delete /var/log/* you will likely delete logs of packages you have installed ... I wouldn't consider that crippling, but it will affect you.
When I say crippling, I mean that you would need to boot a live CD (as was mentioned in post # 2) and fix everything in order to regain a functional system. Deleting /var may crash some programs and delete some possibly important stuff, but you should still be able boot properly, and your computer will still be usable, plus some likely bugs that will appear as a result.
Oh. I thought you were just being funny. You might see if you have any package manager files hanging around that can be cleaned out. In Debian, that would be in /var/cache/apt/archives, I think, but there is an apt command to clear it. I don't know about the other package managers. Other than that, you have to do it the hard way and go looking for it. In gnome, there is a disk usage analyzer that you can run to see graphically where your space is being consumed.