New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

End of year cleanup and performance check

Got problems with your B2 or B3? Share and get helped!
Post Reply
force317
Posts: 34
Joined: 14 Aug 2011, 21:56

End of year cleanup and performance check

Post by force317 »

I often install and delete files on the B3, and apparantly there is no recycle bin folder or something like that, so they are completely removed immediately.

But is everything really gone, aren't there some remnants that keep taking up some disk space, so that after months of use some of the disk capacity gets filled up by these useless leftovers ?

The same can be said about the B3 updates. Are there some files leftover after every update ?

So my question is : is there a set of commands that one can run - i assume through ssh terminal - without risk for the B3 server operating system and setup files - that check the entire system, clean up al the rubbish, and perhaps even improve performance of the B3 and available disk capacity ?
6feet5
Posts: 269
Joined: 13 Apr 2007, 17:32
Location: Gnesta, Sweden
Contact:

Re: End of year cleanup and performance check

Post by 6feet5 »

Hi,

I'm not sure I understand, but I would guess a deleted file is really gone and the space is restored. However there are probably traces left on the hard drive from the file if your concern is security (someone trying to retrieve information from the deleted file).

As for updates, they are stored in /var/cache/apt/archives.

Code: Select all

aptitude autoclean
will remove old packages and

Code: Select all

aptitude clean
will remove all packages. Note that the package will still be installed, it is only the DEB-file that is removed, so aptitude will have to download the DEB-file again if you try to reinstall a package.

/Johan
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: End of year cleanup and performance check

Post by Ubi »

yes the file is really gone. Back in the old days we had undelete for DOS, but for posix systems there is no such thing, and recovering a deleted file isn't trivial at all. The only solution is to read raw blocks from the drive and try to find your file back. The official Unix solution to file recovery is by making backups :mrgreen:

but if you insist: http://carlo17.home.xs4all.nl/howto/undelete_ext3.html
force317
Posts: 34
Joined: 14 Aug 2011, 21:56

Re: End of year cleanup and performance check

Post by force317 »

No, my concern was not security or the possibility of retrieving files.

I only wanted to be sure that after deleting a file and/or directory 100% of the disk space came available
again, that's all.
Kiff
Posts: 48
Joined: 08 Feb 2010, 04:09
Location: Norway
Contact:

Re: End of year cleanup and performance check

Post by Kiff »

Once you delete a file, it's removed and the space is free, however...

Sometimes you want to delete a file that is in use. On windows you're simply not allowed, on Linux the file is deleted but the space is not reclaimed until all filehandles are closed. This is most often seen when deleting log files, and a program (like apache) is still writing to that file.
Post Reply