Does clean installing instead of updating save more space?


Question

I recently removed and reinstalled Google Maps and there was something I noticed that made me post this question.



Before removing the app (which I had for about 2 years and had been updating regularly), it's size was about 60MB. After clean installing the application with it's latest version from the Google Playstore it now has a size of 44,5MB.



Why does this happen? Do updates add size in the app every time it updates? If for example an app occupies 30MB of space and an updates is 7MB, will this space be added to the 30MB? And last but not least....Is clean installing an app instead of updating a better solution if someone needs the app not to dramatically increase in size?


Answer

Usually when an application is being updated, its the case that files (resources in apk - code, libraries, assets, images etc) are being replaced rather than being added. Of course the question, is how big is the portion being replaced, which utimately determines the final size of the "update".


If new resources are added by the application developer without removing anything in the previous version then it will likely be bigger, and if some resources are removed and replaced with less, then its the other way round



If the update has contains more resources than before, it uses more
space. If it's a bug fix (similar to a typo in text), it might even
use a few bytes less space.



For most applications, updates will usually increase the total size to a larger value.
But in your case with Google Maps, it seems the items that replaced ones in previous version are "compressed" i.e much smaller.


Uninstalling old version and clean installation of newer version


When a user application is installed, it usually keeps its data (settings, databases etc) and also cache in the /data partition and cache partition.


Uninstalling the application also deletes this related data.


If you then clean install it, you'd also note size difference (even say the were supposed to be same size apk!) Just as Izzy wrote in comments. In this case the clean install will seem to provide the user with a smaller sized update than updating straight (but its somewhat misleading)


But as expected, the size will also increase as new data and cache are saved.


Note: with this route you likely lose all saved data within the application.


Generally speaking though, uninstalling the old version and installing the new version will use roughly the same space as updating the old version.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes