Recent from talks
Nothing was collected or created yet.
Trash (computing)
View on Wikipedia
In computing, the trash, also known by other names such as trash bin, dustbin, wastebasket, and similar names, is a graphical user interface desktop metaphor for temporary storage for files set aside by the user for deletion, but which are not yet permanently erased. This lifts the burden from the user of having to be highly careful while selecting files for deletion, since a trash bin provides a grace period to reverse unwanted deletions. The concept and name is part of Mac operating systems; a similar implementation is called the Recycle Bin in Microsoft Windows, and other operating systems use other names, sometimes ending with "-bin".
In the file manager, the trash can be viewed by the user as a special file directory, allowing the user to browse the files and retain those still wanted before deleting the others permanently (either one by one, or via an "empty trash" command). It may still be possible using third party software to undelete those that were deleted by mistake. In Microsoft Windows and macOS, the Trash folder links to hidden folders on each mounted drive where the files are actually stored.
The duration for which files are retained in the trash bin varies depending on implementation. They may be retained indefinitely until manually deleted, deleted after a fixed period, or deleted when the recycle bin exceeds a certain size.
Within a trash folder, a record may be kept of each file and/or directory's original location, depending on the implementation. On certain operating systems, files must be moved out of the trash before they can be accessed again. An operating system or file manager may remove trashed files from the file system once they resided in the trash bin for a certain duration, for example after 30 days on Android, or once the trash bin grows to a certain size (see § Microsoft Windows). Unlike in conventional folders, a trash bin may be able to contain files with duplicate names, given that a trash bin acts as a layer before permanent deletion from the file system. An implementation may store trashed files using custom names and references back to their original name stored as metadata, and/or inside hidden subfolders with non-duplicate names on the file system, such as the subfolders inside the $RECYCLE.BIN folder on Microsoft Windows. This is because the user needs to be able to trash any file that they would normally be able to permanently delete, including files with identical names stored in different directories.[1][2]
Whether or not files deleted by a program go to the recycle bin depends on its level of integration with a particular desktop environment and its function. Low-level utilities usually bypass this layer entirely and delete files immediately. A program that includes file manager functionality may or may not send files to the recycle bin, or it may allow the user to choose between these options.[citation needed]
History
[edit]Bill Atkinson began developing the Apple Lisa user interface in late 1978. In March 1982 he reached the stage of changing to an icon-based file manager, and produced a mock-up with a trash can icon (including buzzing flies) for deleting files.[3][4] The release version of Lisa was launched in 1983 with a "Wastebasket",[5] its icon "an alley-style garbage can [with] vertical lines to indicate a ribbed surface .... an open lid and a handle on the front of the can."[6][7] Apple advertised "If you can find the trash can, you can run a computer."[8]
Following this, the Magic Desk I ROM cartridge for Commodore 64 presented a primitive representation of office furniture, with a wastebasket or trash bin under the desk. This lacked functionality and was not taken further.[9]
In 1983 Susan Kare designed the core visual design language of Classic Mac OS System 1, launched in January 1984. This incorporated some elements of the Lisa interface, including a refined version of the icon, now labelled Trash,[10] with "a closed lid with a handle on top."[6] An ad supplement in Newsweek introduced the Mac interface, with its "pictures of objects you'll have no trouble recognizing ... Even a trash can."[11] A subsequent update to Lisa renamed its Wastebasket icon "Trash".[12] In "International English" localizations of Classic Mac OS, Trash was named "Wastebasket".[13]
In 1985, Amiga Workbench 1.0 was released. This took much inspiration from Mac OS, including trash bins. When formatting a floppy disk/hard drive partition, the user could select to add a bin to it. This would then appear as an icon titled "Trashcan" along with the other files. Users could drag unwanted files onto it and empty the bin later.[14]
In early versions of the Macintosh Finder, Trash contents were in volatile memory, and were lost when the computer restarted. From 1987, if anything was in Trash its icon bulged as a reminder to check the contents before shutting down. Following the 1991 introduction of System 7, the Trash folder retains its contents until the user chooses to empty the trash.[15][7]
The outcome of the lawsuit Apple Computer, Inc. v. Microsoft Corp. (filed in 1988, decision affirmed on appeal in 1994) was that graphical user interfaces similar to Apple's did not infringe rights, but some features including Apple's Trash icon were original and protected by copyright. Non-Apple software could use other metaphors for file deletion, such as Recycle Bin, Smart Eraser, or Shredder.[6][16]
In 1993 or 1994, Microsoft implemented its first temporary deletion system in MS-DOS 6, under the name Delete Sentry: When a file was deleted, it was moved to a hidden SENTRY folder at the root of the drive.[17][18]
Microsoft introduced its current trash system in 1995, the Recycle Bin, with Windows 95, as an area to store and review files and folders prior to deletion.[19] At default settings, the Recycle Bin auto-deletion permanently deletes files to free up disk space when it gets low, or deletes files in the Bin over 30 days.[15][20] In this version, the original location record of the file is stored, but the folder itself did not allow subdirectories. When a folder is deleted, its containing files are moved into the bin and mixed with other deleted files. The directory structure can only be restored if the batch of files is "undeleted". The current (revised) Recycle Bin allows for subdirectory trees to exist within folders that have been moved there. The icon shows a bin with a recycling symbol on its front.
With the new interface of Mac OS X introduced in 2001, the Trash icon moved from the desktop to a permanent place at the end of the Dock. The International English "Wastebasket" had been dropped at the end of 2009, making the name "Trash" standard.[21] In keeping with the system appearance, the Trash was a shiny wire basket, until with OS X Yosemite in 2014 it became a translucent white container.[22] With macOS Mojave, the Trash was renamed "Bin" in the Australian English localisation, and with macOS Catalina, "Bin" also appeared in the UK localisation.[23]
Implementations
[edit]Trash functionality is usually integrated into a desktop environment and its file manager. Examples include:
- Classic Mac OS and macOS, with Finder, as "Trash" (localised as "Wastebasket", later "Bin")
- MS-DOS 6.x, with Microsoft Undelete, as "Delete Sentry"
- Microsoft Windows, with Windows Explorer (later called File Explorer starting with Windows 8), as "Recycle Bin"
- GNOME and MATE (Linux), with Nautilus and Caja, respectively
- KDE (Linux), with Konqueror and Dolphin
- Xfce (Linux), with Thunar
- Amiga, with Workbench. The Professional File System added trashcan-esque behavior at the filesystem level.
- Linux Mint with its default filesystem, Nemo,
- Android OS since version 11, with a 30-day "grace period" until trashed files are removed from the file system.[1]
Some implementations may contain "shredding" functionality to counter data remanence.
Linux desktop environments
[edit]The KDE, GNOME[24] and Xfce implementations comply with the freedesktop.org Trash specification,[25] ensuring that any applications written with this specification in mind will be interoperable with any trash can implementation.
Although the various Linux desktop environments such as GNOME, KDE, and Xfce provide a trash mechanism, there is traditionally no simple way to trash something from the command line interface. Some third-party applications, such as trash-cli, provide commands on the command-line to use the trash, compatible with the FreeDesktop.org Trash Specification.
macOS
[edit]Using macOS, a file or folder is deleted in Finder by dragging its icon onto the Trash icon at the right hand end of the Dock, moving the item into the Trash folder, where it can be viewed but not used until it is moved out again. To restore highlighted items from the Trash to their original position, a contextual menu brings up a Put Back option. The keyboard shortcut to move highlighted items to Trash, or Put Back items, is ⌘ Command+Delete. To finally delete files, clicking on "Empty" brings up a warning that this cannot be undone, and an option to delete.[26]
Putting items in the Trash folder moves them to a hidden temporary folder: for the boot disk, a user account has this at /Users/username/.Trash/; each mounted volume such as an external drive has a hidden folder in the root folder named /.Trashes/.[27] When viewing the device's available space the space occupied by the deleted files is shown as occupied. The Trash folder shows deleted files from external drives, including removable media.[28] This does not apply to networked drives, where trying to move an item to Trash brings up a warning that it will be deleted immediately and this cannot be undone.[29]
Since OS X El Capitan, the Trash can be bypassed by pressing ⌥ Option+⌘ Command+Delete when a file is selected.[30] Since macOS Sierra, the user can enable an option to have the Trash automatically empty after 30 days.[31]
In UK and Australian English localisations, the Trash is known as "Bin".[23]
Apps and iOS
[edit]In several macOS apps and in the iOS mobile operating system, the Trash is within apps rather than in the system as a central feature. The standard icon for the Trash is a small version of the original Classic Mac OS trash can. Files are moved to a "Recently Deleted" folder within the app where they remain available for recovery for a stated number of days, then are automatically permanently deleted. Apps where this applies include Photos and Mail.[32][33] Files may still be recoverable if a computer backup was run before they were moved to "Recently Deleted".
Microsoft Windows
[edit]
Microsoft's Recycle Bin is implemented as a special folder with columns like Date deleted and Original location. Typically only files deleted via File Explorer (but not necessarily other Windows graphical interfaces such as file selection dialogs) will be put into the Recycle Bin; files deleted via the Command Prompt are permanently deleted, as (by default) are files deleted via operating system APIs and applications other than Windows Explorer.[34] Some operating system APIs do, however, allow applications to recycle files rather than delete them.[35] In previous Windows operating systems and in MS-DOS, undeletion was the only way to recover accidentally or intentionally deleted files.
As standard, the Recycle Bin only stores files deleted from hard drives, not from removable media, such as memory cards, thumb drives, or floppy disks, nor does it store files deleted from network drives.[36] There are methods to make it work on network paths, however.[citation needed]
The Recycle Bin has a setting to configure the amount of deleted files it can store. Free disk space allocated for this is not actually used until files are deleted from folders and stored in the Recycle Bin. In versions of Windows prior to Windows Vista, the default configuration of the Recycle Bin is a global setting for all drives to hold 10% of the total capacity of each host hard drive volume to store deleted files. For example, on a volume with a capacity of 20 gigabytes, the Recycle Bin will hold up to 2 gigabytes of deleted files. This can be changed anywhere from 0 to 100% of the drive space, but will not be allowed to exceed 3.99GB of space, even if the user-indicated % of the drive space is larger than 3.99GB. If the Recycle Bin fills up to maximum capacity, the oldest files will be deleted in order to accommodate the newly deleted files.[19] If a file is too large for the Recycle Bin, the user will be prompted to immediately and permanently delete the file instead.
The actual location of the Recycle Bin depends on the type of operating system and file system. On older FAT file systems (typically Windows 98 and prior), it is located in Drive:\RECYCLED. In the NTFS filesystem (Windows 2000, XP, NT) it is Drive:\RECYCLER. On Windows Vista and above it is Drive:\$Recycle.Bin.[2]
The Recycle Bin can be accessed as an shortcut from the desktop, by searching "Recycle Bin" in Windows Explorer, or by typing "shell:RecycleBinFolder" in the Run dialog box (⊞ Win+R). It is the only icon shown by default on the Windows XP desktop. When accessed from the desktop, the Recycle Bin options and information are different from those of the physical Recycle Bin folders seen on each partition in Windows Explorer. From Windows XP onwards, with NTFS, different users cannot see the contents of each other's Recycle Bins.
Prior to Windows Vista, a file in the Recycle Bin is stored in its physical location and renamed as D<original drive letter of file><#>.<original extension>.[19] A hidden file called info2 (info in Windows 95 without the Windows Desktop Update) stores the file's original path and original name in binary format.[19] Since Windows Vista, the "meta" information of each file is saved as $I<number>.<original extension> and the original file is renamed to $R<number>.<original extension>.
When the user views the Recycle Bin, the files are displayed with their original names. When the file is "Restored" from the Recycle Bin, it is returned to its original directory and name.[19]
In Windows Explorer, files are moved to the Recycle Bin in a number of ways:
- By right-clicking on a file and selecting delete from the menu
- Selecting the file and pressing the delete key
- Selecting delete from the Task pane in Windows XP
- Selecting the file and choosing delete from the File menu (in Windows XP Explorer)
- By dragging and dropping a file into the Recycle Bin icon
- From the Send To menu
- From a context menu command or some other function in a software application (usually configurable)
It is possible to bypass the Recycle Bin and directly delete a file by holding the SHIFT key while performing an action that would normally send a file to the trash.[37]
Other uses
[edit]The 1984 original Mac and several of its successors (up to the 1987 Macintosh SE) lacked a (then prohibitively expensive) hard drive. Instead, the system ran from a floppy disk which could be ejected (⌘ Command+E), graying out its icon ('ghosting') and leaving its contents in memory, ready to transfer to another disk. In Classic Mac OS, dragging the disk icon to Trash (shortcut ⌘ Command+Y) directly ejected a disk (or CD) without leaving a grayed icon.[15]
Mac OS X removed the transfer option; dragging a disk or storage volume onto Trash converted the icon to the universal Eject symbol before unmounting and ejecting the disk or volume. This does not place the disk/volume in the Trash folder, nor does it erase the disk/volume.
The GNOME Human Interface Guidelines cite using a waste basket to eject a removable disk as an example of a metaphor taken beyond its reasonable use.[38]
See also
[edit]References
[edit]- ^ a b Android 11 has a hidden Recycle Bin for trashed photos and videos - XDA Developers (June 12th, 2020)
- ^ a b "Why does the Recycle Bin have different file system names on FAT and NTFS?". The Old New Thing. MSDN Blogs. 31 January 2006. Retrieved 26 August 2011.
- ^ Hertzfeld, Andy (22 February 1999). "Macintosh Stories: Busy Being Born". Folklore.org. Retrieved 26 August 2011.
- ^ Hertzfeld, Andy. "Folklore.org: Rosing's Rascals". Folklore.org. Retrieved 21 July 2021.
- ^ "Tech Time Warp of the Week: The Apple Lisa, 1983". Wired. 25 October 2013. Retrieved 21 July 2021. Apple Invents the Personal Computer. Again., 1983
- ^ a b c "Apple Computer, Inc. v. Microsoft Corp., 821 F. Supp. 616 (N.D. Cal. 1993)". Justia Law. 25 June 2021. Retrieved 22 July 2021.
- ^ a b Giaimo, Cara (19 April 2016). "Why Only Apple Users Can Trash Their Files". Slate Magazine. Retrieved 23 July 2021.
- ^ "Lisa Trash Can - the Finder files". Put your projects on the Web. Retrieved 22 July 2021.
- ^ "Magic Desk I for Commodore 64". Put your projects on the Web. Retrieved 22 July 2021.
- ^ "Interview with Susan Kare". library.stanford.edu. 11 March 2010. Archived from the original on 11 March 2010. Retrieved 21 July 2021.
"Susan Kare on Working on the Macintosh". library.stanford.edu. 21 July 2010. Archived from the original on 21 July 2010. Retrieved 21 July 2021. - ^ "the Finder files". Introducing Macintosh (in Latin). Retrieved 22 July 2021.
- ^ "Lisa Office System 3.1 Release Date, Specs, Features, Etc.- madeApple". madeApple. 15 July 2019. Retrieved 22 July 2021.
Lineback, Nathan (13 August 2002). "Lisa Office System 3". toastytech.com. Archived from the original on 13 August 2002. Retrieved 22 July 2021. - ^ "GUIdebook > Extras > Trivia". Folklore.org. 2006. Retrieved 30 April 2012.
- ^ [1]1.1.5 Info, 1.2.1 Empty Trash [2]Photographic Evidence
- ^ a b c Panic, Major General (1 August 2006). "trash can". Everything2.com. Retrieved 22 July 2021.
- ^ Lewis, Peter H. (27 August 1991). "PERSONAL COMPUTERS; Norton Desktop for Windows". The New York Times.
- ^ "Delete Sentry Automatically Purges Files When Necessary". Microsoft Support. Microsoft Corporation. Retrieved 3 June 2010.
When Microsoft Undelete is using the Delete Sentry level of protection, files that are deleted are stored in a hidden SENTRY directory in the root of the drive.
- ^ "Now You Delete It, Now You Don't". PC Operating Instructions, Vol.5 Issue 6. Smart Computing. June 1994. Retrieved 3 June 2010.
Delete Sentry. This is the most reliable file-recovery method. This method sets up a hidden directory named SENTRY. UNDELETE saves the contents of all deleted files in this directory. Because these files are kept in the hidden directory, it doesn't matter whether the originals have been written over or not. UNDELETE simply restores the files you want from the SENTRY directory.
- ^ a b c d e "How the Recycle Bin Stores Files". support.microsoft.com. 18 January 2007. Archived from the original on 18 January 2007. Retrieved 18 January 2007.
- ^ "How to Enable & Disable Recycle Bin Auto-Deletion on Windows 10?". MiniTool. 14 July 2020. Retrieved 22 July 2021.
- ^ Smith, Tony (5 November 1999). "Apple drops British English MacOS". The Register. Retrieved 23 July 2021.
- ^ Snell, Jason (16 October 2014). "OS X Yosemite review: A new design built just for Retina Macs". Macworld. Retrieved 23 July 2021.
- ^ a b "Apple ditches Trash can name in the UK with Catalina update in favor of a boring one". iMore. 9 October 2019. Retrieved 23 July 2021.
- ^ "Bug 41850 – Trash should follow fdo trash spec (adds restoring facilities)". Bugzilla.gnome.org. Retrieved 26 August 2011.
- ^ "Trash specification". Freedesktop.org. Retrieved 3 April 2012.
- ^ Tanous, Jim (2 October 2011). "macOS: Using "Put Back" with Your Trashed Files". The Mac Observer. Retrieved 20 June 2021.
- ^ Kessler, Topher (21 September 2009). "Trash problems in OS X? Reset it!". CNET. Retrieved 20 July 2021.
- ^ Pot, Justin (14 July 2017). "How to Empty the macOS Trash on Your External Drives". How-To Geek. Retrieved 9 June 2021.
- ^ Tanous, Jim (2 October 2011). "Please Note: Mac OS X Has No Network Trash Can". The Mac Observer. Retrieved 9 June 2021.
- ^ Klein, Matt (21 March 2016). "How to Skip the Trash and Instantly Delete Files in OS X". How-To Geek. Retrieved 9 June 2021.
- ^ "Here's Why You May Never Need to Empty Trash in macOS Sierra". TekRevue. Retrieved 9 January 2018.
- ^ "How to Empty Trash on iPhone (Step-by-Step Guides 2021)". AnySoftwareTools. 12 April 2021. Retrieved 31 July 2021.
- ^ "System Icons - Icons and Images - iOS - Human Interface Guidelines". Apple Developer. Retrieved 31 July 2021.
- ^ "Files Deleted at MS-DOS Prompt Do Not Go to Recycle Bin". Support.microsoft.com. 19 January 2007. Archived from the original on 17 January 2008. Retrieved 9 September 2011.
- ^ "c# - How do you place a file in recycle bin instead of delete?". Stack Overflow. Retrieved 26 August 2011.
- ^ "Recycle Bin overview: Windows XP Professional Product Documentation". Microsoft.com. Retrieved 9 September 2011.
- ^ "HOW TO: Bypass the Recycle Bin When You Delete Files and Folders in Windows XP". Support.microsoft.com. 26 March 2004. Retrieved 9 September 2011.
- ^ "Create a Match Between Your Application and the Real World". Library.gnome.org. Retrieved 10 October 2015.
External links
[edit]Trash (computing)
View on Grokipedia~/.Trash directory.[2] Similarly, in Linux desktop environments like GNOME on Ubuntu, the Trash is accessible via the file manager sidebar, where deleted items are held until the user chooses to empty it, with an option for immediate permanent deletion using Shift + Delete.[3] The Trash implementation in Linux adheres to the Freedesktop.org Trash Specification, which standardizes how trashed files are stored (including metadata like original paths and deletion dates), listed, and undeleted across compatible desktop environments such as KDE, GNOME, and XFCE.[4]
The Trash concept originated in the early 1980s as part of Apple's pioneering graphical user interface development for the Lisa computer in 1983 and the Macintosh in 1984, where it was envisioned as a user-friendly "wastebasket" to simplify file management—famously marketed with the tagline, "If you can find the trash can, you can run a computer."[5] Early designs for the Lisa featured a tipped-lid icon, refined by designer Susan Kare for the Macintosh and evolving over macOS versions to include visual cues like a bulging can when full.[5] While Apple's Trash influenced broader adoption, equivalent features appeared in other systems, such as Microsoft's Recycle Bin in Windows, though the term "Trash" is predominantly associated with Unix-like systems.[1] Today, emptying the Trash typically requires user confirmation, permanently removing items from the holding area, though data may remain recoverable until overwritten by other files.[2]
Core Concepts
Definition and Purpose
In computing, the trash—also referred to as the recycle bin or wastebasket—serves as a temporary storage mechanism for files and folders that users have marked for deletion, rather than immediately and permanently erasing them from the storage system.[6] It operates primarily as a graphical user interface (GUI) element, often depicted by an icon mimicking a physical container, though equivalents exist in command-line interfaces for non-graphical environments.[1] This design ensures that deleted items remain accessible in a designated folder until explicitly purged, distinguishing it from direct file system removal.[7] The core purpose of the trash is to safeguard against accidental deletions, offering users a reversible step in file management that restores confidence during routine operations.[6] By holding items in limbo, it acts as a safety net for data recovery, thereby minimizing the risk of permanent data loss from user errors.[7] These features collectively enhance the usability of file systems, promoting more efficient and less error-prone workflows in digital environments.[6] This functionality draws from the metaphor of physical waste disposal, where items are set aside in a bin before final discard, translated into computing to make abstract file operations more relatable and intuitive for users.[8] The trash concept first emerged in the GUI of the Apple Lisa computer in 1983.[5]Operational Mechanism
When a user initiates a file deletion operation through a standard interface in most operating systems, the system does not immediately erase the file from storage; instead, it relocates the file to a designated trash directory, preserving the file's data and associated metadata such as its original name, path, and deletion timestamp. This process involves copying or moving the file contents to the trash location while updating the filesystem to remove the original reference, effectively hiding it from normal view but retaining recoverability.[9][10] The trash functions as a hidden or virtually presented folder, often structured with subdirectories to separate file data from metadata. For example, the file itself may be stored in a "files" subdirectory, while a companion metadata file—such as a .trashinfo entry—records details like the original location (e.g., [Trash Info] with Path= and DeletionDate= fields) to enable restoration to the exact prior state. This separation ensures that the original filesystem structure remains intact for potential recovery without altering the trashed file's integrity.[9] The operation distinctly differs from permanent deletion, which bypasses the trash entirely and directly removes the file's references from the filesystem, marking its storage space as available for overwriting without intermediate storage. Standard "delete" commands (e.g., via keyboard shortcut or menu) trigger the move-to-trash action by default, whereas explicit permanent delete options (e.g., holding Shift during deletion or using low-level commands like rm) invoke immediate erasure.[9][10] Permanent deletion from the trash occurs through specific triggers, including manual user initiation of an "empty trash" command, which systematically removes all contents and their metadata, or automated processes when storage thresholds are reached. In systems with configurable policies, files may be automatically purged if the trash exceeds a defined size limit or age (e.g., after 30 days), freeing disk space while notifying the user if needed. For instance, in Linux environments adhering to the Freedesktop Trash specification, the trash directory is typically ~/.local/share/Trash.[9][10]Historical Evolution
Early Innovations
The concept of a trash or wastebasket in graphical user interfaces drew early inspiration from the desktop metaphor pioneered at Xerox PARC's Alto system in 1973, which introduced icons representing files and folders on a simulated desktop, though it lacked an explicit trash mechanism for file deletion.[11] This foundational GUI approach, emphasizing visual icons and mouse-driven interactions, profoundly influenced subsequent systems at Apple, where designers adapted these metaphors to create more intuitive file management tools.[11] The first explicit implementation of a trash-like feature appeared in the Apple Lisa GUI, released in January 1983, where it was introduced as the "Wastebasket" icon positioned on the desktop.[12] Users could delete files by dragging them into the Wastebasket, which visually indicated contents through a tilted lid, providing a recoverable holding area before permanent deletion and marking the inaugural use of such a metaphor in a commercial personal computer operating system.[12] This innovation addressed the need for safer file removal in a graphical environment, building directly on Xerox's icon-based paradigms but adding the practical recovery element absent in earlier systems.[12] In 1984, the Macintosh System Software refined this concept by renaming the feature to "Trash" and enhancing its integration with drag-and-drop operations across the Finder interface, allowing seamless file movement to the Trash for deletion while maintaining recoverability by dragging items back out.[13] The Trash icon, typically located in the lower-right corner of the desktop, became a core element of the Macintosh's user-friendly design, emphasizing intuitive gestures that made file management accessible to non-experts and setting a standard for future GUIs.[13] An early non-Apple implementation appeared in the Amiga Workbench 1.0 GUI, released in 1985 with the Commodore Amiga 1000 computer, featuring a "Trashcan" icon on the desktop for moving deleted files to a temporary storage area from which they could be restored.[14] Early non-Apple experiments with similar features also emerged in NeXTSTEP, released in 1988 for the NeXT Computer, which introduced a "Black Hole" icon functioning as a trash can within its object-oriented desktop environment.[15] This implementation allowed users to drag files into the Black Hole for temporary storage and recovery, reflecting NeXT's emphasis on advanced, metaphor-driven interfaces influenced by Macintosh precedents but tailored for professional workstation use.[15]Standardization and Legal Influences
The Apple v. Microsoft lawsuit, initiated in 1988 and resolved in 1994, significantly influenced the development and nomenclature of trash mechanisms in graphical user interfaces. Apple alleged that Microsoft's Windows violated a licensing agreement by copying elements of the Macintosh GUI, including the trash can icon for file deletion. The Ninth Circuit Court of Appeals ruled in Microsoft's favor on most claims but upheld Apple's copyright on specific visual elements, such as the trash can icon, prompting Microsoft to differentiate its implementation to avoid further litigation. This legal pressure led to the adoption of distinct metaphors, with Apple retaining the "Trash" can and Microsoft opting for "Recycle Bin" to emphasize recovery and reuse, thereby standardizing divergent branding in commercial operating systems.[16] Microsoft's Recycle Bin debuted with Windows 95 in August 1995, marking a key adaptation of the trash concept for widespread personal computing. This feature provided a centralized repository for deleted files across drives, allowing users to restore or permanently delete them, and was designed to align with the lawsuit's outcomes by avoiding direct replication of Apple's iconography. The introduction helped popularize the trash paradigm beyond proprietary systems, influencing subsequent desktop environments.[7] In the open-source domain, the Freedesktop.org Trash specification, first proposed in 2004 and formalized around 2005, established interoperability standards for Unix-like systems. Developed collaboratively by desktop environment projects like KDE and GNOME, it defined a common protocol for storing trashed files in user-specific directories (e.g., ~/.local/share/Trash), including metadata like original paths and deletion timestamps, to enable consistent behavior across applications and file managers. This specification facilitated cross-desktop compatibility, reducing fragmentation in Linux and other Unix variants.[17][18] Subsequent milestones further refined standardization through platform-specific enhancements. In macOS Sierra (released in 2016), Apple introduced an optional auto-empty feature that permanently deletes items from the Trash after 30 days, configurable via Finder preferences, to balance recovery with storage management. Similarly, Android 11 (launched in 2020) added a hidden recycle bin for media files, allowing apps to move deleted photos and videos to a temporary storage area for up to 30 days before automatic purging, enhancing user safeguards without altering core deletion workflows. These developments reflect ongoing efforts to harmonize trash functionality amid evolving legal and technical landscapes.[19][20]Desktop Implementations
Linux Desktop Environments
Linux desktop environments implement the trash functionality in accordance with the Freedesktop.org Trash specification, which standardizes the storage, listing, and restoration of deleted files to ensure interoperability across applications and distributions. Under this specification, files deleted from the user's home directory are moved to the home trash directory at $XDG_DATA_HOME/Trash (typically ~/.local/share/Trash), divided into 'files' for the actual content and 'info' for .trashinfo metadata files containing details like the original path, deletion timestamp, and MIME type.[9] This approach allows for reversible deletions while preserving essential metadata for recovery.[9] Implementations vary across environments to suit their design philosophies while adhering to the core spec. In GNOME, the Nautilus file manager employs a virtual trash view via the GVFS (GNOME Virtual File System) backend, presenting trashed files as a unified, browsable location (accessible at trash:///) that abstracts the physical directories and supports operations like previewing and selective restoration without exposing the underlying structure. KDE's Dolphin file manager integrates trash handling with its search capabilities, allowing users to query and filter contents within the trash using the built-in search bar, which leverages the Baloo file indexing service for efficient retrieval even in large trash collections. Similarly, XFCE's Thunar file manager supports multi-volume trash by automatically creating .Trash directories on removable or secondary volumes (prefixed with the user ID, e.g., .Trash-1000), ensuring deleted files from external media remain on their original volume rather than being relocated to the home trash.[21] For users preferring or requiring command-line access, tools like trash-cli provide a non-graphical interface compliant with the Freedesktop Trash specification, offering commands such astrash-put to move files to trash, trash-list to enumerate contents with metadata, trash-restore to recover items, and trash-empty to permanently delete them.[22] This utility is particularly useful in server environments or minimal installations without a full desktop.
Recent developments in these environments continue to refine trash usability. KDE Plasma 6, released in February 2024, includes general improvements to the desktop.[23] In GNOME 47, released in September 2024, Nautilus received performance optimizations.[24] As of November 2025, subsequent releases like GNOME 48 (March 2025) and GNOME 49 (September 2025) have maintained core trash functionality with no fundamental changes.[25]
macOS
In macOS, the Trash is deeply integrated with the Finder application, serving as a temporary holding area for deleted files and folders. When a user deletes an item via the Finder, it is moved—rather than copied—to a hidden.Trash directory located on the originating volume, such as ~/.Trash for the startup disk or /.Trashes/<user-id> for other volumes. This move operation inherently preserves the file's original permissions, ownership, and extended attributes, including metadata like resource forks and custom tags, ensuring that restoration maintains the item's integrity.[26][27]
A key feature of the macOS Trash is the "Put Back" option, which allows users to restore selected items to their exact original locations with a single command. Introduced in Mac OS X Snow Leopard (version 10.6) in 2009, this functionality relies on Finder-maintained metadata stored alongside the trashed files, enabling seamless reversal even across multiple folders or drives. Users can access "Put Back" by right-clicking an item in the Trash window, selecting it from the File menu, or using the keyboard shortcut Command-Delete while the Trash is active.[28][29]
Unlike some other systems, the macOS Trash imposes no artificial size limit on its contents, allowing it to consume available disk space until manually emptied or the volume fills up, at which point the system issues storage warnings to prevent crashes or performance issues. In macOS Sierra (version 10.12) released in 2016, Apple added an optional auto-empty feature that permanently deletes items from the Trash after 30 days of inactivity; this can be enabled via Finder > Settings > Advanced > "Remove items from the Trash after 30 days." When the Trash grows excessively large, macOS displays notifications urging users to empty it, particularly if it impacts overall storage.[19][30]
Localization adapts the Trash's name and interface to regional preferences: in the United Kingdom and Australia, it is labeled "Bin" rather than "Trash," a change fully implemented starting with macOS Mojave (version 10.14) in 2018 for English variants in those locales. Historically, the Trash also functioned as an eject mechanism for removable volumes and disk images; dragging a mounted drive to the Trash would change the icon to an eject symbol and unmount the volume safely, a behavior dating back to early Macintosh systems but retained through modern versions without removal in Mojave.[31]
In macOS Sequoia (version 15), released in 2024, the Trash maintains its core mechanics unchanged as of update 15.2 (December 2024).[32]
Microsoft Windows
In Microsoft Windows, the Recycle Bin serves as the primary trash mechanism, introduced in its graphical form with Windows 95 to provide users with a recoverable storage for deleted files and folders, evolving from the command-line UNDELETE utility available in MS-DOS systems during the 1980s.[33][34] When a user deletes a file or folder via File Explorer, it is moved to a hidden system folder named Recycle.Bin folders exist per volume.[35] The Recycle Bin's storage capacity is configurable through its properties dialog, accessible by right-clicking the desktop icon. Prior to Windows Vista, the default limit was 10% of the user's disk quota per volume. Starting with Windows Vista, the default allocation shifted to 10% of the first 40 GB of quota and 5% of any quota exceeding that, with users able to set a custom maximum up to approximately 4 GB (specifically 4095 MB) per drive via a slider, beyond which older items are automatically deleted to enforce the limit.[36] In multi-drive setups, this quota applies independently to each volume's $Recycle.Bin, allowing for tailored management but potentially leading to fragmented recovery options across partitions. Users can bypass the Recycle Bin entirely by holding the Shift key while pressing Delete, which permanently removes files without confirmation or recovery via the Bin.[37] Integration with File Explorer enables straightforward restoration: within the Recycle Bin view, users can right-click a deleted item and select "Restore" to return it to its original location and filename, preserving metadata like modification dates where possible.[38] This process leverages the original file paths stored in accompanying metadata files (such as $Ixxx records) to ensure accurate placement. In Windows 11, released in 2021, enhancements include improved search functionality within the Recycle Bin via File Explorer's built-in search bar, allowing users to filter and locate items by name, date deleted, or type more efficiently than in prior versions.[39] The Windows 11 version 24H2 update in 2024 introduced general context menu refinements in File Explorer but retained the core Recycle Bin mechanism without fundamental alterations.[40] This design, influenced in part by early legal considerations including Apple's lawsuit over graphical interface similarities, emphasizes user-friendly recovery in a proprietary ecosystem distinct from open-source alternatives.[33] As of November 2025, the Recycle Bin functionality remains unchanged following Windows 10 end-of-support in October 2025.Mobile and Application Implementations
iOS and iPadOS
In iOS and iPadOS, there is no centralized system-wide trash mechanism akin to desktop operating systems; instead, file deletion and recovery are handled through app-specific "Recently Deleted" folders designed to provide a safety net for user actions without exposing the underlying file system. This siloed approach ensures that deletions occur within the context of individual applications, limiting accidental permanent loss while maintaining security and stability. For instance, the Photos app moves deleted images and videos to a dedicated Recently Deleted album, where they remain accessible for recovery for 30 days before automatic permanent deletion. This feature was first introduced with iOS 8 in 2014, marking a significant improvement in mobile photo management by allowing users to undo mistakes without immediate data loss. Users can manually select and permanently delete items from this album at any time to free up storage sooner.[41][42][43] The Files app follows a similar model, retaining deleted documents, folders, and other user files in its own Recently Deleted section for 30 days, after which they are automatically removed. This retention period applies uniformly across supported apps, including Mail and Notes, where deleted content is held temporarily for potential restoration. Manual emptying of these folders is available via simple interface options, such as selecting "Delete All" or individual items, enabling proactive storage management. Integration with iCloud extends this functionality by syncing deletions and the Recently Deleted contents across all signed-in devices, so removing or recovering an item on an iPhone updates the status on an iPad or Mac seamlessly, provided iCloud services like Photos or Drive are enabled. This synchronization ensures consistency but requires users to check the folder on each device if offline deletions occur.[44][45][46] Released in 2024, iOS 18 and iPadOS 18 introduce minor refinements to recovery processes, such as improved visibility in the Photos app's Recovered album for potentially lost media, but the Files app's Recently Deleted maintains its core 30-day retention without major expansions to a broader trash system. Previews and thumbnails of deleted files in the Files app aid in quick identification and selection during recovery, a standard capability that supports efficient user interaction. However, these mechanisms are strictly limited to user-generated content within apps, excluding system files or protected OS elements, which cannot be deleted or recovered through these folders to prevent device instability. This app-centric design prioritizes ease of use for personal media and documents while avoiding the complexities of full file system access on mobile devices.[47][44]Android
In Android 11, released in 2020, Google introduced a hidden system recycle bin primarily for photos and videos deleted through compatible apps, allowing users to recover them before permanent deletion. This feature integrates with scoped storage to temporarily retain such media files on the device without immediate removal, helping prevent accidental data loss. Files in this hidden bin are automatically deleted after 30 days unless restored or manually cleared.[48][20] The Google Photos app maintains a separate "Bin" for deleted images and videos, which holds items for 60 days to provide extended recovery options, longer than the system bin's duration. This app-specific bin applies to both backed-up and local media, with automatic permanent deletion after the retention period or upon manual emptying. Since Android 12 in 2021, the Files by Google app has offered system-wide access to the trash for media and other supported files, enabling users to view, restore, or permanently delete items directly from the app or via storage settings. Items in the Files app trash also follow a 30-day retention policy before automatic removal to manage device storage.[49][50][51] Android does not provide a default recycle bin for all file types across the system, limiting the feature mainly to media handled by native or integrated apps. Implementation varies by device manufacturer; for example, Samsung's Gallery app includes a dedicated "Recycle bin" for photos and videos, retaining them for 30 days with options to restore or empty the bin. In Android 15, released in 2024, no changes to trash retention periods were implemented, maintaining the existing 30-day standard for system and Files app bins.[52][53]Third-Party Applications
In web browsers, trash-like mechanisms for recovering deleted items such as bookmarks are typically limited to immediate undo actions rather than persistent storage. Google Chrome provides an "Undo" option immediately after deletion in the Bookmark Manager (accessible via chrome://bookmarks), allowing users to restore recently removed bookmarks or folders without permanent loss, though this is not a dedicated trash folder and expires quickly. Similarly, Mozilla Firefox offers an "Undo" command (Ctrl+Z or via the Bookmarks Library menu) for reversing bookmark deletions shortly after they occur, supplemented by automatic backups that enable restoration of entire bookmark sets from previous sessions. Productivity applications often implement version history or temporary recovery bins as pseudo-trash systems to safeguard against accidental data loss. In Microsoft Office apps like Word, Excel, and PowerPoint, the Version History feature (accessible via File > Info > Version History) stores previous iterations of documents in OneDrive or SharePoint, enabling users to preview and restore earlier versions, effectively recovering "deleted" content or changes without a traditional trash.[54] Adobe Creative Cloud applications, such as Photoshop and Illustrator, route deleted files to a "Deleted" section within the Assets panel or Creative Cloud storage, where they remain recoverable for 30 days before permanent deletion, mimicking a trash bin for project files and assets. Cross-platform utilities extend trash concepts through search and wiping tools that interact with or circumvent file recovery. The Everything application from Voidtools uses real-time indexing to enable rapid searches for recently deleted files across NTFS volumes, facilitating recovery before data overwrite by locating them via filename even if moved to the Recycle Bin.[55] In contrast, CCleaner provides secure wiping options (e.g., via Tools > Drive Wiper) that overwrite free space on drives, including remnants in the Recycle Bin or trash, to prevent recovery of deleted files and bypass standard undelete mechanisms. Cloud-based tools like Google Drive maintain a dedicated Trash folder for deleted files, holding them for 30 days across My Drive and shared drives, with restoration available via right-click or the web interface; this policy, standardized since 2020, saw no significant updates for shared file handling in 2023 or major changes through 2025.Enhanced Features
File Recovery Processes
File recovery from the trash in computing systems typically involves user-initiated actions to return deleted files or folders to their original locations without permanent data loss, provided the items have not been purged. The standard process across major desktop environments begins with accessing the trash interface through the file manager or desktop icon. Users select the desired item(s) and invoke a restore command, such as "Restore" in Windows and Linux environments or "Put Back" in macOS, which moves the content back to its pre-deletion path while preserving metadata like timestamps where possible.[56][57][30] When restoring, systems handle potential conflicts—such as when a file with the same name already exists at the target location—through standard file operation dialogs. For instance, in Microsoft Windows, the Recycle Bin restore uses Explorer's conflict resolution, prompting the user to replace, skip, or rename the file (e.g., appending "(1)" to the filename). Similar behavior occurs in GNOME Files on Linux, where the restore action offers options to replace, keep both, or cancel via Nautilus's merge dialog. In macOS, the "Put Back" function attempts to place the item in its original spot; if a conflict arises, Finder may append a number (e.g., "filename 2") or display an overwrite confirmation. These mechanisms ensure users can resolve duplicates without unintended data loss.[58][59][60] Recovery supports multiple files and entire folder structures simultaneously, maintaining hierarchical organization during restoration. In Windows, users can select multiple items in the Recycle Bin via Ctrl+click or Shift+click, then right-click and choose "Restore" to return all to their respective original paths, including nested subfolders. GNOME Files allows similar multi-selection in the Trash view, with the "Restore" option applying recursively to folders and their contents. For KDE Plasma's Dolphin, recent deletions can be undone with Ctrl+Z to restore to original locations; for items in Trash, multi-selection with right-click "Restore" or drag-and-drop returns them to exact original paths using stored metadata. This capability is essential for recovering complex directory trees without manual reconfiguration, and is enabled by standards like the Freedesktop.org Trash Specification in Linux environments.[56][57][61][4] A key limitation arises if the original file path no longer exists, such as when the parent folder has been deleted or renamed since the initial move to trash. In Windows, the system recreates the necessary folder structure using stored metadata to restore the item to its original path. If this fails, users may need to manually specify a location. macOS's "Put Back" relies on stored metadata for the path; if unavailable or invalid (e.g., file deleted outside Finder), the option may not appear, requiring users to manually drag the item from Trash to a desired location. In Linux environments following the Freedesktop Trash Specification, such as GNOME, restoration attempts to recreate the original path if inaccessible; file managers may prompt for a new location if recreation fails. This emphasizes the importance of prompt recovery to avoid such issues.[4][30]Storage Management
In computing trash systems, storage management involves mechanisms to prevent the trash from consuming excessive disk space, balancing recoverability with resource efficiency. For Microsoft Windows, the Recycle Bin employs configurable per-drive storage limits to allocate space dynamically. Users can set a custom maximum size through the Recycle Bin properties dialog, where the default allocation is approximately 10% of the first 40 GB of drive space and 5% of any additional space beyond that, resulting in typical limits of 5-10% overall per drive.[36] This prevents the Recycle Bin from indefinitely expanding, though exceeding the limit prompts users to empty it manually or via system tools like Storage Sense, which automatically clears old items when space is low.[62] On macOS, the Trash operates without a hard storage limit, allowing it to grow until disk space is critically low, at which point the system issues warnings via notifications or the Storage settings interface to encourage emptying.[63] To mitigate unbounded growth, macOS includes an optional automatic deletion feature introduced in macOS Sierra (2016), which removes items from the Trash after 30 days of inactivity; this can be enabled in Finder > Settings > Advanced.[30] For Android implementations, particularly in Google Photos, deleted items remain in the trash for 60 days before permanent removal, while general Google Drive trash items are auto-deleted after 30 days, helping manage cloud and local storage without fixed quotas.[64][65] Manual emptying of the trash across platforms permanently deletes items and immediately frees disk space, which can enhance system performance by reducing fragmentation and alleviating low-storage conditions that slow file operations. In Windows, for instance, emptying the Recycle Bin via the context menu or Disk Cleanup tool resolves space constraints that otherwise degrade multitasking and application responsiveness.[66] Similarly, on macOS and Linux, this action clears the Trash folder (e.g., ~/.local/share/Trash on Linux), potentially improving Finder or file manager UI speed when large volumes of items accumulate.[67] Recent enhancements in Linux environments, such as the trash-cli utility, support custom purging scripts for finer storage control. Thetrash-empty <days> command allows users to remove files older than a specified period (e.g., 30 days), and integration with cron jobs enables automated daily execution, as in (crontab -l ; echo "@daily $(which trash-empty) 30") | crontab -, providing flexible options for space management without relying on desktop environment defaults.[22]
Security and Alternative Practices
Risks and Secure Deletion
Files moved to the trash or Recycle Bin are not immediately erased from the storage medium; instead, they are relocated to a designated folder and marked for later deletion, allowing recovery through forensic tools until the trash is emptied or the space is overwritten. This recoverability poses significant security risks, as sensitive data can be retrieved even after deletion, potentially leading to data leaks in investigations or unauthorized access scenarios. For instance, digital forensics experts can analyze Recycle Bin artifacts, such as INFO2 files in Windows, to reconstruct deleted file paths, sizes, and timestamps, enabling the recovery of discarded evidence.[68][69] To mitigate these risks, users can bypass the trash mechanism for permanent deletion by employing secure methods that overwrite data or use hardware-specific erasure, depending on the storage type. Multi-pass overwriting is suitable only for traditional hard disk drives (HDDs), where it renders recovery infeasible; however, it is ineffective and not recommended for solid-state drives (SSDs) due to wear leveling. For HDDs, in Microsoft Windows, pressing Shift+Delete during file selection deletes the item directly without routing it to the Recycle Bin, though additional overwriting is recommended for security; for enhanced protection, tools like Eraser overwrite files using patterns compliant with NIST SP 800-88 (a single pass of zeros or ones). On Unix-like systems including Linux, the srm command from the secure-delete suite serves as a secure alternative to rm for HDDs, overwriting files with random data in a single pass before unlinking them, per NIST guidelines. For SSDs, which are standard in modern systems as of 2025, best practices include using the ATA Secure Erase command via manufacturer tools (e.g., hdparm on Linux or vendor utilities like Samsung Magician) or enabling full-disk encryption to protect data at rest.[70][71][72][73] In shared or multi-user environments, such as Linux systems with multiple accounts, the per-user trash directories (typically ~/.local/share/Trash) can introduce privacy implications if permissions are misconfigured, allowing other users or administrators to access or recover discarded files from shared storage volumes. This vulnerability is heightened in collaborative setups where devices are passed between users, potentially exposing confidential information unless isolated user profiles and strict access controls are enforced.[74] Best practices for secure deletion include routinely emptying the trash to free space and trigger actual erasure, combined with full-disk encryption tools like BitLocker on Windows or LUKS on Linux, which render all data—including trash contents—unreadable without the decryption key even if physically recovered. For devices slated for disposal, use built-in secure erase commands (e.g., ATA Secure Erase for SSDs or dd for overwriting HDD free space) to ensure data sanitization, aligning with guidelines from cybersecurity authorities such as NIST SP 800-88. Avoid multi-pass overwriting on SSDs, as it can reduce drive lifespan without improving security.[75][76][77][73]Integration with Backup Systems
In macOS, Time Machine integrates with the Trash by leveraging local snapshots to enable recovery of files even after the Trash has been emptied, allowing users to restore previous versions of deleted items from point-in-time backups stored on the local drive. These snapshots, created automatically when space is available, capture the file system state without requiring an external backup disk, providing a seamless extension to Trash functionality for data protection. In contrast, Windows Backup and File History typically exclude the Recycle Bin from their scope, focusing instead on versioning personal libraries and documents to recover files from pre-deletion states, without directly backing up or restoring contents held in the trash itself.[78][79][80] Cloud storage services enhance Trash recovery through synchronization with backup mechanisms, extending retention periods beyond standard trash holds. For iCloud Drive, deleted files are moved to a Recently Deleted folder for 30 days, during which they remain accessible across devices and can be restored; this integrates with iCloud backups, which retain device snapshots for up to 180 days after the last update, allowing comprehensive recovery if the trash period lapses (as of November 2025). Google Drive similarly syncs trashed files for 30 days before automatic deletion, but administrators using Google Vault can restore them for an additional 25 days, combining trash retention with policy-based backups for prolonged protection in enterprise environments (as of 2025). OneDrive's Recycle Bin provides a unified 93-day retention across first- and second-stage bins, where deleted items are held before permanent removal; a 2023 policy clarification emphasized this combined trash-backup approach, ensuring files remain recoverable via versioning even post-trash expiration (as of 2025).[81][82][83][84][85][86] In version control systems, trash-like mechanisms interact with backup and history features to support undelete operations, treating deletions as reversible changes within a repository's timeline. Git's staging area (also known as the index) functions conceptually as a temporary holding space for proposed deletions, allowing users to unstage and recover files before committing, akin to a trash bin that integrates with the full commit history for restoration from any prior snapshot. Subversion (SVN) offers undelete capabilities through its repository versioning, where deleted files can be resurrected by copying them from a previous revision using commands likesvn copy, preserving the entire history as a backup layer that extends beyond local trash recovery.[87][88][89]