Disklessly
Free up disk space without deleting anything. Cleaners make room by deleting;
Disklessly makes room by trading a few seconds at launch for space, and keeps
every app and its data.
清理磁盘的另一种思路:用时间换空间,数据一样不丢。 清理软件靠删东西腾空间,Disklessly 只让你打开时多等几秒,应用和数据都还在。
中文简介: 把不常用的 macOS 应用打包存到 iCloud Drive、NAS 或 WebDAV,本机只留一个很小的替身(stub)。双击替身时再下载、校验、挂载并启动应用。256 GB 的 Mac 也够用。
Disklessly moves Mac apps you rarely use out of /Applications and into a repo
you control: a folder in iCloud Drive, an SMB or NFS share, a WebDAV or OpenList
server, or any local folder. Each app is stored as a verified DMG image and is
replaced by a small signed stub with the same name and icon. When you open the
stub, Disklessly downloads the image (or uses the cached copy), checks its
SHA-256, mounts it read-only, and starts the app. Documents and URLs you open
with the stub are passed on to the app.
It comes as a menu-bar app, Disklessly.app, with a dashboard, and as the
disklessly command-line tool. Both use the same engine.
用户指南 / User guide: docs/user-guide.md covers
install, packing, launching, the cache, backends, several Macs, the menu-bar app,
troubleshooting, and uninstalling, in Chinese and English.
Install
App (recommended). Download Disklessly-<version>.dmg from
Releases, drag Disklessly to
Applications, and open it. A drive icon appears in the menu bar; choose
Open Dashboard. The app is signed with a Developer ID and notarized. The CLI
is inside it at /Applications/Disklessly.app/Contents/MacOS/disklessly:
sudo ln -s /Applications/Disklessly.app/Contents/MacOS/disklessly /usr/local/bin/disklessly
Homebrew. Both the app and the CLI come from the project tap
(nwverse/homebrew-tap):
brew install --cask nwverse/tap/disklessly # menu-bar app; links disklessly and dkl
brew install nwverse/tap/disklessly-cli # or just the CLI
# upgrade later:
brew update && brew upgrade --cask nwverse/tap/disklessly # or: brew upgrade nwverse/tap/disklessly-cli
The cask installs the signed, notarized Disklessly.app and links the CLI inside it
as disklessly and dkl. The formula installs disklessly, dkl, and
disklessly-stub from the release tarball; on macOS those binaries carry the same
Developer ID signature and notarization as the app. Install one or the other, not
both. On Linux the formula installs the matching build (x86_64 or aarch64), which
needs glibc 2.34 or newer plus libsqlite3, libcurl, and libxml2. The formula
and cask templates are in packaging/homebrew/.
Tarball. disklessly-<version>-macos-universal.tar.gz holds bin/disklessly,
bin/disklessly-stub, and share/disklessly/web. Keep that layout: the CLI looks
for the stub launcher beside itself and for the dashboard in ../share/disklessly/web.
Linux builds are disklessly-<version>-linux-x86_64.tar.gz and
disklessly-<version>-linux-aarch64.tar.gz. Check downloads against SHA256SUMS.
Requires macOS 13 or later, on Apple silicon or Intel.
First run
disklessly init # repo in iCloud Drive by default; or: init --root /Volumes/NAS/Disklessly
disklessly recommend # big apps you have not opened in a while
disklessly pack "/Applications/Some App.app"
init prints where the repo, cache, and stubs are, and the cache quota (20 GiB
by default). recommend ranks apps by size and time since last use, skips system
apps, running apps, and things that should stay installed (login items, menu-bar
agents, Xcode and other toolchains), and says when an app is already in the repo
from another Mac so packing it needs no upload.
pack builds the image, verifies it, uploads it, and only then replaces the app
with a stub. Images are LZFSE-compressed (ULFO) by default, which is much faster
to build than LZMA (--image-format ULMO or DISKLESSLY_IMAGE_FORMAT=ULMO switch
back). When the backend reports a SHA-256 for an uploaded object (Google Drive does),
the upload is verified against it instead of downloading the image again. The
dashboard shows each stage (check, hash, archive, encrypt, upload with live bytes,
verify, stub) while it runs. It prints the size, whether the image was reused or uploaded, where
the stub is, and what happened to the original. The original is deleted after the
image is confirmed; pass --keep-original to keep it next to the stub as
<Name>.256orig.app. If the cloud copy is not confirmed yet, pack keeps the
original and says why.
Mac App Store apps are packed in restore mode by default (--mode restore
selects it for any app): the app is copied back for the session and returned to
the repo after you quit it. Everything else uses mount mode and runs straight
from the read-only image.
Everyday use
- Open the stub from Finder, Launchpad, Spotlight, or the Dock as usual.
Or run
disklessly launch "Some App" (--doc FILE, --url URL, --no-wait);
disklessly restore "Some App" forces restore mode for one launch.
disklessly list shows packed apps; disklessly status shows the cache and the state of each app.
disklessly pin APP keeps an app's image in the cache; unpin lets the cache drop it.
disklessly prefetch APP downloads ahead of time, for example before a flight.
disklessly evict APP drops the cached image; the repo copy stays.
disklessly evict-local removes local iCloud copies of repo files that finished uploading.
disklessly gc tidies up: finishes interrupted launches, moves unreferenced images to
the repo's trash (kept 7 days), and trims the cache to its quota. gc --dry-run shows
what it would do.
disklessly doctor checks the setup and prints each check as it finishes.
A mistyped app name gets suggestions (Did you mean: ...). Add --json to any
command for machine-readable output.
The dashboard
The menu-bar app opens the dashboard in its own window. From a terminal,
disklessly ui --open serves the same page and opens it in your browser
(disklessly ui --json prints url, port, and token for scripts). The page
shows an interactive nested treemap of disk usage (click any box to zoom in,
press Escape to zoom out, right-click for actions), the backend, cache use
against the quota, packed apps with icons and sizes, pins, other Macs that share
the repo, and the recommend list. From each app row you can open, prefetch, pin
or unpin, evict, and unpack; packing a new app is disklessly pack. The page is
bilingual (Chinese and English) and follows the system light or dark appearance.
It listens only on 127.0.0.1 and needs the random token in the URL.
The treemap loads deeper folders on demand, in parallel, and keeps what you have
expanded when it refreshes. Deleting or offloading an item from its right-click
menu updates only the folder you are looking at instead of jumping back to the top.
Rebuildable caches such as ~/Library/Caches/<app> (for example go-build) and
Xcode DerivedData can be moved to the Trash from the map; the rest of ~/Library
stays protected. For an app that is already a stub, the menu explains that the
remaining space is the app's data and offers to reveal it in Finder or offload it.
Linked bundles. Right-click a folder or file in the map and choose
Link to app to pick an app from a searchable list. Linked items are offloaded
and brought back together with that app, and come back automatically when you open
its stub. Large files and folders are uploaded and downloaded in parallel chunks.
The menu-bar item has Open Dashboard, Copy Dashboard URL, the version, and
Quit. The app has no Dock icon; reopening it shows the dashboard window again.
Bring apps back, or uninstall
disklessly unpack APP puts the real app back in place of its stub after checking
its tree hash and code signature. unpack APP --to ~/Desktop copies it out and
leaves the stub.
- To remove Disklessly completely:
- Run
disklessly list and disklessly unpack APP for every app you want back.
- If you used
disklessly sessions --apply, run disklessly sessions restore ID
for every archived transcript you want back (sessions search finds them).
Keep the Keychain session key until this is done if you used --encrypt.
- Quit Disklessly from the menu bar and move it to the Trash (or
brew uninstall --cask Disklessly).
- Delete
~/Library/Application Support/Disklessly/ and ~/Library/Caches/Disklessly/.
- Delete the repo folder only after steps 1 and 2, and only if no other Mac uses it.
Deleting the repo is permanent. After pack the repo image is the only copy of
the app, and sessions --apply deletes the local transcripts it archives. Apps you
did not unpack and sessions you did not restore are gone with the repo.
Stubs for apps you did not unpack stop working once step 4 removes the engine copy
they run (~/Library/Application Support/Disklessly/bin/disklessly).
Several Macs, one repo
Point every Mac at the same repo (disklessly init --root ..., or the default iCloud
Drive folder). Images are write-once and keyed by bundle id, version, build,
architectures, and a content hash, so the same app on two Macs is stored once and
the second pack does not upload again. Each Mac writes only its own
devices/<id>.json, and gc never deletes an image that any Mac still lists, even
a Mac that has been offline for months. disklessly devices lists the Macs and what
they use; devices rename NAME sets this Mac's name, and
devices forget DEVICEID --yes drops a Mac you no longer use. Pins, cache, and launch state
stay on each Mac.
Repos on a share or WebDAV server: disklessly backend add smb|nfs|webdav|openlist ...,
then backend use ID. Cloud drives go through the bundled rclone: disklessly cloud connect gdrive|dropbox|onedrive|box|pcloud, and disklessly openlist install sets up a local OpenList. Passwords are read from --password-stdin and kept in the
Keychain. See docs/backends.md.
Free version and license
The free version offloads up to 2 items at once: apps, and files or folders offloaded with disklessly offload, counted together. Starting, restoring (unpack), evicting and detaching
apps you already offloaded never needs a license; only pack checks the limit, and packing an app that is
already offloaded again does not count as a new one. A license code removes the limit:
Codes are checked offline against a public key built into the app; nothing is sent anywhere.
A license does not expire and includes a year of updates. A promo code has a last day; after it
the free limit applies again and apps already offloaded keep working.
Buy a license, then:
disklessly license # shows "Free version: 1 of 2 apps offloaded" or your license
disklessly license activate DSL1.…
disklessly license deactivate
The dashboard has a License card with the same actions and a Buy a license button.
Permissions
- App Management (System Settings > Privacy & Security > App Management): needed
to replace or restore apps in
/Applications. Grant it to Disklessly.app, and to
your terminal if you use the CLI. Without it, pack and unpack fail with a
permission error and leave the app as it was.
- Full Disk Access: only needed when the repo or the apps live in a protected
location, or for
disklessly sessions on folders macOS guards.
- Apps owned by root:
pack may leave /Applications/.disklessly-original-*.app
behind. disklessly cleanup-backups verifies and removes them with one
administrator prompt. It never asks for or stores your password itself.
Privacy
No telemetry, analytics, or update checks. Disklessly talks only to the repo you
configure. Details are in PRIVACY.md.
Safety
- Nothing is replaced until a verified image exists in the repo. A missing,
placeholder, or mismatched image stops
pack with exit 5 and the app stays.
- Every launch checks the image SHA-256 before mounting. A dataless iCloud file is
never attached.
- Restore-mode launches are journaled. A crash or power loss is finished by the next
launch, gc, or doctor --fix. If you changed an app while it was restored,
disklessly resolve APP keeps, exports, or discards those changes.
- Stubs that
pack writes are ad-hoc signed on your Mac. They are generated per app
and never leave the Mac, so they cannot carry the release's Developer ID.
- Try it first on an app you can reinstall.
Mount lifecycle and repo scoping
disklessly evict APP refuses a pinned app (exit 9, reason pinned); add
--force to drop its cache anyway (the pin stays). A mounted or in-use image is
never evicted, even with --force.
disklessly detach APP [--force] detaches an app's image now instead of after the
detach delay (120 s by default). It refuses while the app is still running.
disklessly reap [--dry-run]