{"id":14980468,"url":"https://github.com/iricigor/psaptgetupdate","last_synced_at":"2025-09-07T15:44:07.500Z","repository":{"id":109049562,"uuid":"154969356","full_name":"iricigor/psaptgetupdate","owner":"iricigor","description":"Provide functionality for PowerShellGet inspired by Linux command apt-get update. You can 100 times faster search for online modules, scripts, updatable modules, etc.","archived":false,"fork":false,"pushed_at":"2019-06-13T23:32:45.000Z","size":802,"stargazers_count":9,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-12T00:06:57.594Z","etag":null,"topics":["apt-get","apt-get-update","fast","find","linux-command","local-caching","module","package-management","powershell","powershell-cmdlets","powershell-core","powershell-gallery","powershell-modules","powershellget","update"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iricigor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-27T13:47:04.000Z","updated_at":"2023-12-19T09:33:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"d5dc4877-2e93-4bb3-b9e6-8fcc62b08c40","html_url":"https://github.com/iricigor/psaptgetupdate","commit_stats":{"total_commits":58,"total_committers":4,"mean_commits":14.5,"dds":0.4655172413793104,"last_synced_commit":"db81ea883c7505bbe7a047bab70fe2aa37593f56"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/iricigor/psaptgetupdate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iricigor%2Fpsaptgetupdate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iricigor%2Fpsaptgetupdate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iricigor%2Fpsaptgetupdate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iricigor%2Fpsaptgetupdate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iricigor","download_url":"https://codeload.github.com/iricigor/psaptgetupdate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iricigor%2Fpsaptgetupdate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274058943,"owners_count":25215200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apt-get","apt-get-update","fast","find","linux-command","local-caching","module","package-management","powershell","powershell-cmdlets","powershell-core","powershell-gallery","powershell-modules","powershellget","update"],"created_at":"2024-09-24T14:01:49.090Z","updated_at":"2025-09-07T15:44:07.452Z","avatar_url":"https://github.com/iricigor.png","language":"PowerShell","readme":"# PowerShell's apt-get update\n\nThis module provides functionality for PowerShellGet inspired by Linux command `apt-get update`. You can **100 times faster** search for online modules, scripts, updatable modules, etc.\n\n*This is only proof-of-concept work, though it is (almost) fully functional.*\n\n## Explanation\n\nCurrently PowerShell and PowerShellGet are having following two issues\\feature requests which are related to each other:\n\n- Finding information about modules and scripts is very slow. It is running over the Internet and last about two seconds. This implementation speeds search commands 100 times, downto 20 ms!\n- When user types command which they do not have installed on the system, we can instruct them how to install it in some cases.\n\nCore of the module is local index (cache) of all modules, scripts and commands which is just simply downloaded from the repository.\nGenerated index file is prepared (generated and zipped) on a dedicated cloud VM, but command for that is also included in the module.\nFor verification, it can be also executed locally.\n\nIt would be good to implement this functionality in PowerShellGet and PowerShell Gallery directly.\n\nFor more details, see (illustrated) [design page](Design.md).\n\n## Speed comparison\n\nActual speed will depend on your local system, namely of a disk and processor speed.\nResults below are from medium class personal computer.\nOn low end machines, results will not be more than 2-3 times slower, which is still 20-50 times faster than already existing commands.\n\nIf further speed improvement is needed, simple indexing can increase speed a few times.\n\n### Results for 10 repetitions (in seconds)\n\n 10x executed | Find-Command | Find-Script | Find-Module\n-- | -- | -- | --\nold commands | 22.9751159 | 23.0243 | 23.4820757\nnew commands | 0.2507481 | 0.188659 | 0.1713624\n\n### How testing was done\n\nTesting was done executing commands similar to the ones below.\nTest was repeated 5 times and middle result was recorded.\n\n```PowerShell\nMeasure-Command {1..10 | % {Find-Command 'Read-Credential' -Repository 'PSGallery'}} | Select TotalSeconds\nMeasure-Command {1..10 | % {Find-CommandFromCache 'Read-Credential'}} | Select TotalSeconds\n```\n\n## Error handling\n\nModule is also updating default `CommandNotFoundAction` error handler. As it is running fast, if it can, it will tell you how to add requested command! Just like in some Linux distros.\n\n![Error Handling](Images/ErrorHandling.png)\n\n## How to install\n\nYou can install this module in a couple of ways listed below.\n\n- **From PowerShell Gallery** _(preferred way)_:\n\nModule can be installed from [PS Gallery](https://www.powershellgallery.com/packages/psaptgetupdate) using the command \n\n```PowerShell\nInstall-Module psaptgetupdate -Scope CurrentUser\n```\n\n- **Clone repository:**\n\nIf you want to see the entire GitHub repository, just clone it and import module afterwards.\n\n```PowerShell\ngit clone https://github.com/iricigor/psaptgetupdate.git\nImport-Module .\\psaptgetupdate.psd1 -Force\n```\n\n\n\n## Commands\n\nThis module provides following commands:\n\n### Cache Management\n\n- `Update-PSRepositoryCache` (alias PSAptGetUpdate)- Downloads index file and expands it to local cache, equivalent to `apt-get update` Linux command.\n- `New-PSRepositoryCache` - Generates zipped index file and uploads it to storage account. This is running as a scheduled task on dedicated server. Standard users do not need to run it.\n\n### Search and Update Operations\n\n- `Find-ModuleFromCache`   - finds modules in local cache\n- `Find-ScriptFromCache`   - finds scripts in local cache\n- `Find-CommandFromCache`  - finds command in local cache\n- `Update-ModuleFromCache` - finds updatable modules in local cache, it **accepts wildcard '*'**; _for POC it supports -WhatIf simulation only_\n\n## Examples\n\n### Update-Index\n\n```PowerShell\nUpdate-PSRepositoryCache\n```\n\nCreates local repository cache. Internet connection is required. Should be run first, before other examples. Command runs for about 4-5 seconds.\nIf executed with -Verbose switch, you may actually see how old is server version of index file.\n\n### Find-Command\n\n```PowerShell\nFind-CommandFromCache 'Get-Folder' | Select -First 3\n```\n\n```text\nModuleName                Name       Version         Repository\n----------                ----       -------         ----------\nVMware.VimAutomation.Core Get-Folder 11.0.0.10336080 PSGallery\nWFTools                   Get-Folder 0.1.58          PSGallery\nPSFolderSize              Get-Folder 1.6.3           PSGallery\n```\n\nThis command runs in about 20 milliseconds, which is about 100 times faster than standard `Find-Command`.\n\n### Update all modules\n\nIf called without any names, this command will update all modules in the system. In this POC, actual update is not implemented, so you need to run it with `-Verbose` or -`WhatIf` to see actual updatable modules.\n\nPlease note from verbose output that commandlet in this mode is processing dozens of modules per second!\nStandard commandlet `Update-Module` takes about 15 second to check for update of one module.\n\n```PowerShell\nUpdate-ModuleFromCache -Verbose\n```\n\n```text\nVERBOSE: 31-Oct-18 10:47:50 PM Update-ModuleFromCache starting\nVERBOSE: 10:47:50 PM Reading list of all modules from the system\nVERBOSE: 10:48:12 PM checking module ClipboardText for updatable version\nVERBOSE: 10:48:12 PM Performing action Update to version 0.1.7 on target Module 'ClipboardText' version 0.1.1\nVERBOSE: Performing the operation \"Update to version 0.1.7\" on target \"Module 'ClipboardText' version 0.1.1\".\nVERBOSE: 10:48:12 PM checking module EasyAzureFunction for updatable version\nVERBOSE: 10:48:12 PM Performing action Update to version 0.7.1 on target Module 'EasyAzureFunction' version 0.6\nVERBOSE: Performing the operation \"Update to version 0.7.1\" on target \"Module 'EasyAzureFunction' version 0.6\".\nVERBOSE: 10:48:12 PM checking module fifa2018 for updatable version\nVERBOSE: 10:48:12 PM Performing action Update to version 0.2.45 on target Module 'fifa2018' version 0.1.11\nVERBOSE: Performing the operation \"Update to version 0.2.45\" on target \"Module 'fifa2018' version 0.1.11\".\nVERBOSE: 10:48:12 PM checking module Plaster for updatable version\nVERBOSE: 10:48:12 PM checking module platyPS for updatable version\nVERBOSE: 10:48:12 PM Performing action Update to version 0.12.0 on target Module 'platyPS' version 0.11.1\nVERBOSE: Performing the operation \"Update to version 0.12.0\" on target \"Module 'platyPS' version 0.11.1\".\n```\n\n## External Links\n\n- **`apt-get update`** - [man page](https://linux.die.net/man/8/apt-get), [askubuntu.com](https://askubuntu.com/questions/222348/what-does-sudo-apt-get-update-do)\n- **`PowerShellGet`** - [MSFT docs](https://docs.microsoft.com/en-us/powershell/module/powershellget), [GitHub repo](https://github.com/PowerShell/PowerShellGet)\n\n## Build status\n\nEach commit or PR to master is checked on [Azure DevOps](https://azure.microsoft.com/en-us/services/devops/) [Pipelines](https://azure.microsoft.com/en-us/services/devops/pipelines/) on two build systems:\n\n\n1. Ubuntu **Linux** v.16.04 LTS host running PowerShell (Core) v.6.1 [![Windows Build Status](https://dev.azure.com/iiric/PSAptGetUpdate/_apis/build/status/PSAptGetUpdate-CI-Linux)](https://dev.azure.com/iiric/PSAptGetUpdate/_build/latest?definitionId=9)\n2. **Windows** host running Windows PowerShell v.5.1 [![Windows Build Status](https://dev.azure.com/iiric/PSAptGetUpdate/_apis/build/status/PSAptGetUpdate-CI-Win)](https://dev.azure.com/iiric/PSAptGetUpdate/_build/latest?definitionId=8)\n\n## Support\n\nYou can chat about this commandlet via [Skype](https://www.skype.com) _(no Skype ID required)_, by clicking a link below.\n\n[![chat on Skype](https://img.shields.io/badge/chat-on%20Skype-blue.svg?style=flat)](https://join.skype.com/hQMRyp7kwjd2)\n\n## Contributing\n\nIf you find any problems, feel free to open a new issue.\n\n![GitHub open issues](https://img.shields.io/github/issues/iricigor/psaptgetupdate.svg?style=flat)\n![GitHub closed issues](https://img.shields.io/github/issues-closed/iricigor/psaptgetupdate.svg?style=flat)\n\nIf you want to contribute, please fork the code and make a new PR after!\n\n![GitHub](https://img.shields.io/github/license/iricigor/psaptgetupdate.svg?style=flat)\n![GitHub top language](https://img.shields.io/github/languages/top/iricigor/psaptgetupdate.svg?style=flat)\n\n\n## Module icon\n\nModule icon represents **faster update symbol** in PowerShell similar colors.\n\n![Fast Update icon](Images/psaptgetupdate-icon-256.png \"Fast Update icon\")","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firicigor%2Fpsaptgetupdate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Firicigor%2Fpsaptgetupdate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Firicigor%2Fpsaptgetupdate/lists"}