Announcement

Collapse
No announcement yet.

How do I safely delete unneeded files from /

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How do I safely delete unneeded files from /

    The partition of 11.6g on which / is mounted has completely filed up. I did a search on *.log and came up with an incredible number which had accumulated. I want to delete as many files which are safe to delete as I can from the partition in which / is mounted without having to do it one file at a time using konqueror. Being a newbie I do NOT know which files are safe to delete, and that is what my post is asking--how do I go about recapturing space in the / partition without having to delete files one at a time using knowledge I do not possess.

    #2
    Re: How do I safely delete unneeded files from /

    Not my specialty, as it seems sometimes I'm not sure what I know about Linux root filesystem structure

    but, here's some stuff I wrote, and I'm afraid it takes a high-level, safe approach, like that you'd get with sweeper (8.10) or kcontrol (8.04), but you can also go to apps and dig into their caches and so on; more specific examples/ideas for you to pursue here:

    Privacy Cleanup 101
    http://kubuntuforums.net/forums/inde....msg115011#new
    Reply #5: About kcontrol
    Reply #8: How to Delete Data from Your Hard Drives & USB Drives
    See Reply #10: Privacy Cleanup 101: Update/Summary for Intrepid Ibex KDE4
    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Re: How do I safely delete unneeded files from /

      Root being filled up can be remedied by cleaning the apt package caches. You might need to boot into recovery (single user) mode if you can't boot into the desktop.

      From the prompt type:
      Code:
      apt-get clean
      (or sudo apt-get clean)

      man apt-get
      clean
      clean clears out the local repository of retrieved package files.
      It removes everything but the lock file from
      /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When
      APT is used as a dselect( 8 ) method, clean is run automatically.
      Those who do not use dselect will likely want to run apt-get clean
      from time to time to free up disk space.
      Windows no longer obstructs my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Re: How do I safely delete unneeded files from /

        I have done that already but not much was freed up. I installed kleansweep and saw a lot of files under orphaned but a google search advised extreme caution. Looks like there is a lot of stuff, eg bak files, tmp files which could be deleted, but I am hesitant. In win2000 there was cclean

        Comment


          #5
          Re: How do I safely delete unneeded files from /

          How many kernel versions do you have on your system?
          Windows no longer obstructs my view.
          Using Kubuntu Linux since March 23, 2007.
          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

          Comment


            #6
            Re: How do I safely delete unneeded files from /

            Do you have strigi installed? It's been a wild kubuntu ride for me the last few weeks. It started out with my 12g hd drive getting so full (I only had 304mb available) that the gui would not boot. So I did a windows thing and ordered a new computer. while I was waiting I did several things that this forum suggested including removing strigi. Wow, did that work! My 12g hd was now only using 3.4g.

            Comment


              #7
              Re: How do I safely delete unneeded files from /

              Snowhog. I have only one kernel -from 8.04.

              Comment


                #8
                Re: How do I safely delete unneeded files from /

                Originally posted by ahurd
                I did a search on *.log and came up with an incredible number which had accumulated.
                Logs are usually not an issue space-wise (unless you run busy public servers). There are a lot of them, but most are quite small in size. Also, logrotate, which runs daily via cron, will rotate logs periodically and get rid of older logs. Some logs are kept longer than others (this is configurable), but eventually deleted.

                Using 'apt-get clean' (or 'sudo apt-get clean') should usually free up enough space to get a system up (if it's really full), as Snowhog pointed out. After that you could use a tool like 'filelight' (installable from the repos) to analyze what is taking your space (you can then google or ask here whether the things that eat up your disk are essential or if there's a way to get rid of them).

                Comment


                  #9
                  Re: How do I safely delete unneeded files from /

                  Thank you for filelight. Looks like most of space is in /usr. I have installed kleansweep and ran it looking for orphaned files. It found a lot but googling says this is very dangerous to use to remove them Is there any safe way?

                  Comment


                    #10
                    Re: How do I safely delete unneeded files from /

                    Originally posted by ahurd
                    Looks like most of space is in /usr.
                    That is logical, most of the stuff you install go to /usr.

                    It found a lot but googling says this is very dangerous to use to remove them Is there any safe way?
                    I'm afraid there is no universal answer, It's quite possible to mess up a system by carelessly removing stuff from system directories (and I wouldn't recommend using any automated tools unless you know what you're doing).

                    That being said, /usr shouldn't gather much cruft on it's own. It basically only contains things you've installed (and possibly manually put there for some reason). So if /usr takes a lot of space, I'd suggest uninstalling (purging) stuff you don't need.

                    Comment


                      #11
                      Re: How do I safely delete unneeded files from /

                      Many thanks.

                      Comment


                        #12
                        Re: How do I safely delete unneeded files from /

                        for your no longer required depends you could also run
                        Code:
                        sudo apt-get autoremove
                        and could some one tell me why apt-get clean and not apt-get autoclean?
                        Mark Your Solved Issues [SOLVED]
                        (top of thread: thread tools)

                        Comment


                          #13
                          Re: How do I safely delete unneeded files from /

                          man apt-get
                          An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

                          Comment

                          Working...
                          X