Differences between revisions 2 and 30 (spanning 28 versions)
Revision 2 as of 2009-04-10 13:38:53
Size: 625
Editor: ?wekt
Comment:
Revision 30 as of 2009-06-25 20:24:29
Size: 5030
Editor: ?wekt
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#language en
||<tablestyle="width: 100%;" style="border: 0px hidden">~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: none-~||<style="text-align: right;border: 0px hidden"> (!) [[/Discussion|Discussion]]||
----
''Translation'' [[https://wiki.debian.org/de/FreeSpace|Deutsch]]
= Freeing Disk Space =
If you think you are running near the end of your disk space, this information may help you.
Line 5: Line 5:
If you are running near the end of your disk space, the information here may help you. Firstly confirm what devices you have, whether they are mounted or not. Run (as root or sudo) {{{
fdisk -l
}}} Then see which of those are mounted and what space is available on them by typing in a console {{{
df -hT
}}} or in X Windows, run the program {{{kdf}}}.
Line 7: Line 11:
If you feel that you need to free up some space, here are a few tips and tricks.
== Command line tools to see seldom used files ==
 * DebianPkg:agedu : will not function if file system option noatime is used.
Line 8: Line 15:
* aptitude -F '%I %p' search '~i'|egrep '^[0-9]+[\.,]?[0-9]*[MG]B'|sort -n To list packages that take up most of the disk space with aptitude into visual mode, select Views → New Flat Package List (this menu entry is available only after etch version), press l and enter ~i, press S and enter ~installsize, then it will give you nice list to work with. Doing this after upgrading aptitude should give you access to this new feature.
Line 10: Line 17:
* wajig size In lenny, aptitude has "why" and "why-not". {{{
 aptitude why package1 }}} shows why package1 may have been installed. {{{
 aptitude why package1 package2 }}} tries to work out why installing package1 would drag in package2.
Line 12: Line 21:
=== Tools to erase ===
==== files you do not want ====
bleachbit
localepurge
==== packages you do not want ====
deborphan
debfoster
"why-not" looks at conflicts.

These commands only provide one possible explanation. Check /var/log/aptitude for definitive information.

Using [[aptitude]] to list uninstalled recommended or suggested packages: {{{
aptitude search '~RBsuggests:~i!~i'
}}}To list upgradeable packages:{{{
aptitude search '~U'
}}}To list manually installed packages:{{{
aptitude search '~i!~M'
}}}To install without recommends but not uninstalling other recommends:{{{
aptitude install -R -o Aptitude::Keep-Recommends=true
}}}To list packages in increasing order of size:{{{
aptitude -F '%I %p' search '~i'|egrep '^[0-9]+[\.,]?[0-9]*[MG]B'|sort -n
}}}

Using [[DebianMan:1/dpigs|dpigs]] (DebianPkg:debian-goodies):{{{
dpigs -n50
}}}Using DebianPkg:wajig :{{{
wajig size
}}}

== Tools to erase ==
=== files you do not want ===
 * DebianPkg:bleachbit ([[DebianSqueeze|Squeeze]] and later)
 * DebianPkg:localepurge

=== packages you do not want ===
 * DebianPkg:debfoster
 * DebianPkg:deborphan The textual user interface is provided by the program {{{orphaner}}}.

== Tools to alter files to reduce them ==
 * [[DebianMan:1/strip|strip]] (DebianPkg:binutils)
  * eg. {{{strip --strip-unneeded foo}}}
Stripping {{{dbus-daemon}}} exposes a bug in BFD.
Executing in {{{find /usr/bin -not -name strip -and -not -name dbus-daemon -execdir strip --strip-unneeded '{}' \; }}} reduced the size of contents of the directory in a Squeeze installation from 140MB to 120MB.
 * DebianPkg:upx-ucl [[http://upx.sourceforge.net/|Ultimate Packer for eXecutables]]
Do not compress DebianPkg:bash or your scripts will crash. Compressed executables may require more memory when run.
== Reduce data creation ==
Use the following line as your {{{/etc/rsyslog.conf}}} configuration file in order to not save logs but output them on virtual terminal 12:
 {{{
*.* -/dev/tty12}}}

On systems that have been running for some time you might consider stripping out old log files.

Note that localepurge is a package that will strip unwanted language versions from everything you install. If you want a new language in the future you will have to add the locale and then re-install the package.

You might consider running {{{ dpkg -l }}} periodically and manually going through it to see if there are packages which you never use. Alternately you can install the package popularity-contest and run {{{ popularity-contest | sort > popcon }}} This will list the packages in least-used order in a text file called ~/popcon. Then to actually remove some unwanted/unused package you can do {{{ aptitude purge -s <unwanted package> }}} to simulate the process and see what else is affected. You can answer yes to seemingly drastic removals because the {{{ -s }}} makes it simulate and report, not actually execute. Once you are happy with the consequences do {{{ aptitude purge <unused package> }}} and aptitude will still tell you what it's doing and what dependencies are affected, but when you say Yes, it will actually execute the removal.

Using a compressed filesystem can save a lot of space. Typically squashfs reduces space used by about 50%, but it is read-only.

If you have a read-only source like a DVD, an overlaid unifying file system like [[http://aufs.sourceforge.net/|aufs]] or Linux's "union mount" can save changes in a writeable filesystem, saving the user the space of the unchanged portions. The same could be accomplished with a snapshotted filesystem as with Linux Volume Manager (lvm2).

__Wish list: __
 * ''media compressions.''
 * ''free space disk control like df''
 * ''using Quota as usrquota groupquota waringquota in DebianPkg:quota''

Translation Deutsch

Freeing Disk Space

If you think you are running near the end of your disk space, this information may help you.

Firstly confirm what devices you have, whether they are mounted or not. Run (as root or sudo)

fdisk -l

Then see which of those are mounted and what space is available on them by typing in a console

df -hT

or in X Windows, run the program kdf.

If you feel that you need to free up some space, here are a few tips and tricks.

Command line tools to see seldom used files

  • agedu : will not function if file system option noatime is used.

Command line tools to see which package are using the most disk space:

To list packages that take up most of the disk space with aptitude into visual mode, select Views → New Flat Package List (this menu entry is available only after etch version), press l and enter ~i, press S and enter ~installsize, then it will give you nice list to work with. Doing this after upgrading aptitude should give you access to this new feature.

In lenny, aptitude has "why" and "why-not".

 aptitude why package1 

shows why package1 may have been installed.

 aptitude why package1 package2 

tries to work out why installing package1 would drag in package2.

"why-not" looks at conflicts.

These commands only provide one possible explanation. Check /var/log/aptitude for definitive information.

Using aptitude to list uninstalled recommended or suggested packages:

aptitude search '~RBsuggests:~i!~i' 

To list upgradeable packages:

aptitude search '~U'

To list manually installed packages:

aptitude search '~i!~M'

To install without recommends but not uninstalling other recommends:

aptitude install -R -o Aptitude::Keep-Recommends=true

To list packages in increasing order of size:

aptitude -F '%I %p' search '~i'|egrep '^[0-9]+[\.,]?[0-9]*[MG]B'|sort -n

Using dpigs (debian-goodies):

dpigs -n50

Using wajig :

wajig size

Tools to erase

files you do not want

packages you do not want

Tools to alter files to reduce them

Stripping dbus-daemon exposes a bug in BFD. Executing in find /usr/bin -not -name strip -and -not -name dbus-daemon -execdir strip --strip-unneeded '{}' \;  reduced the size of contents of the directory in a Squeeze installation from 140MB to 120MB.

Do not compress bash or your scripts will crash. Compressed executables may require more memory when run.

Reduce data creation

Use the following line as your /etc/rsyslog.conf configuration file in order to not save logs but output them on virtual terminal 12:

  • *.* -/dev/tty12

On systems that have been running for some time you might consider stripping out old log files.

Note that localepurge is a package that will strip unwanted language versions from everything you install. If you want a new language in the future you will have to add the locale and then re-install the package.

You might consider running  dpkg -l  periodically and manually going through it to see if there are packages which you never use. Alternately you can install the package popularity-contest and run  popularity-contest | sort > popcon  This will list the packages in least-used order in a text file called ~/popcon. Then to actually remove some unwanted/unused package you can do  aptitude purge -s <unwanted package>  to simulate the process and see what else is affected. You can answer yes to seemingly drastic removals because the  -s  makes it simulate and report, not actually execute. Once you are happy with the consequences do  aptitude purge <unused package>  and aptitude will still tell you what it's doing and what dependencies are affected, but when you say Yes, it will actually execute the removal.

Using a compressed filesystem can save a lot of space. Typically squashfs reduces space used by about 50%, but it is read-only.

If you have a read-only source like a DVD, an overlaid unifying file system like aufs or Linux's "union mount" can save changes in a writeable filesystem, saving the user the space of the unchanged portions. The same could be accomplished with a snapshotted filesystem as with Linux Volume Manager (lvm2).

Wish list:

  • media compressions.

  • free space disk control like df

  • using Quota as usrquota groupquota waringquota in quota