dphys-swapfile - Autogenerate and use a swap file

Property Value
Distribution Ubuntu 18.04 LTS (Bionic Beaver)
Repository Ubuntu Universe amd64
Package name dphys-swapfile
Package version 20100506
Package release 3
Package architecture all
Package type deb
Installed size 60 B
Download size 12.91 KB
Official Mirror archive.ubuntu.com
This init.d script exists so one does not need to have a fixed size
swap partition. Instead install without swap partition and then run this,
with file size (re-)computed automatically to fit the current RAM size.
By default (and hence on installation) it creates swapfile twice as
big as the present RAM amount with an upper limit of 2 GB.
It's also very helpful when included in SD card, USB stick or disk
images which are distributed and run on many machines with different
amount of RAM, e.g. different models of the Raspberry Pi or cloud


Package Version Architecture Repository
dphys-swapfile_20100506-3_all.deb 20100506 all Ubuntu Universe
dphys-swapfile - - -


Name Value
dc -
lsb-base >= 3.0-6


Type URL
Binary Package dphys-swapfile_20100506-3_all.deb
Source Package dphys-swapfile

Install Howto

  1. Update the package index:
    # sudo apt-get update
  2. Install dphys-swapfile deb package:
    # sudo apt-get install dphys-swapfile




2017-01-20 - Axel Beckert <abe@debian.org>
dphys-swapfile (20100506-3) unstable; urgency=medium
* Add versioned dependency on lsb-base for using /lib/lsb/init-functions
in the init script.
* Add patch to first call chmod, then mkswap. This avoids a mkswap
warning about insecure permissions, suggesting the permissions the
file will be set to anyways afterwards.
* Add patch by basti to use fallocate if available to create the swap
file much faster than with dd.
2016-04-28 - Axel Beckert <abe@debian.org>
dphys-swapfile (20100506-2) unstable; urgency=medium
* Declare compliance with Debian Policy 3.9.8. (No changes needed.)
* Move packaging git repository from GitHub to Alioth.
* Add lintian-override for accused misspelling "allways".
* Revamp debian/copyright:
+ Convert to machine-readable DEP5 format.
+ Update copyright years.
+ Update upstream author's e-mail address.
+ Update initial packager's last name.
+ Fix download URL (dphys-config vs dphys-swapfile; follow redirect)
* Long package description: Add a paragraph about usefulness with
provisioned SD card, USB stick and disk images.
* Add debian/maintscript to help migration from /etc/bash_completion.d/
to /usr/share/bash-completion/completions/.
2013-10-01 - Axel Beckert <abe@debian.org>
dphys-swapfile (20100506-1) unstable; urgency=low
* Upload to unstable again.
* New upstream release
+ Fixes issues on kfreebsd-*.
* Install bash completion file provided by Hans-Christoph Steiner
(Closes: #685113) Thanks!
* Install upstream's example configuration file also to /etc/. (Closes:
* Add note to long description about the default values used upon
installation. (See #596187 for reasoning.)
* Switch to source format "3.0 (quilt)"
+ Remove debian/README.source
* Bump Standards-Version to 3.9.4 (no changes)
* Fix lintian warnings:
+ debian-rules-missing-recommended-target
+ no-upstream-changelog
+ copyright-refers-to-symlink-license
+ init.d-script-does-not-source-init-functions
+ init.d-script-does-not-implement-optional-option status
* Switch Vcs-* headers to GitHub
* Add Elmar to Uploaders.
* Bump debhelper compatibility to 9.
+ Update versioned debhelper build-dependency accordingly.
* Revamp debian/rules:
+ No more clean stamp files manually, done by dh_clean already
+ Use dh_auto_{build,install,clean}
+ Finally switch to a minimal dh7 style debian/rules file
* Apply wrap-and-sort.
2011-02-11 - Axel Beckert <abe@debian.org>
dphys-swapfile (20100506~current-1) experimental; urgency=low
* New upstream snapshot
- uses dc instead of expr, so depend on dc
- All patches introduced in the previous upload have been accepted by
upstream (partially being improved, too) within a day and therefore
been removed from the package. Thanks, Neil!
+ remove build dependency on quilt, too.
- Fixed spelling error in previous changelog entry.
* Bump Standards-Version to 3.9.1 (no changes)
2011-02-11 - Axel Beckert <abe@debian.org>
dphys-swapfile (20061020-4) unstable; urgency=low
* Fix wrong magnitude in last upload's bugfix for 564466 when
calculating swap size. (Closes: #612877, LP: #706764) Thanks Antonio
Galea <antonio.galea@gmail.com> for a very unintrusive patch.

See Also

Package Description
dpic_2014.01.01+dfsg1-0ubuntu2_amd64.deb Produce diagrams for LaTeX documents or web files
dpkg-awk_1.2+nmu2_all.deb Gawk script to parse /var/lib/dpkg/{status,available} and Packages
dpkg-dev-el_36.3ubuntu1_all.deb Emacs helpers specific to Debian development
dpkg-sig_0.13.1+nmu4_all.deb create and verify signatures on .deb-files
dpkg-www_2.57_all.deb Web based Debian package browser
dpm-copy-server-mysql_1.10.0-2_amd64.deb DPM copy server with MySQL database backend
dpm-copy-server-postgres_1.10.0-2_amd64.deb DPM copy server with postgres database backend
dpm-name-server-mysql_1.10.0-2_amd64.deb DPM nameserver server with MySQL database backend
dpm-name-server-postgres_1.10.0-2_amd64.deb DPM nameserver server with postgres database backend
dpm-rfio-server_1.10.0-2_amd64.deb DPM RFIO (Remote File IO) server
dpm-server-mysql_1.10.0-2_amd64.deb Disk Pool Manager (DPM) server with MySQL database backend
dpm-server-postgres_1.10.0-2_amd64.deb Disk Pool Manager (DPM) server with postgres database backend
dpm-srm-server-mysql_1.10.0-2_amd64.deb DPM SRM server with MySQL database backend
dpm-srm-server-postgres_1.10.0-2_amd64.deb DPM SRM server with postgres database backend
dpm_1.10.0-2_amd64.deb Disk Pool Manager (DPM) client